/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2010 Free Software Foundation, Inc.
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef GRUB_MACHINE_MIPS_LOONGSON
#endif
GRUB_MOD_LICENSE ("GPLv3+");
int
{
int found = 0;
{
if (pciid == GRUB_CS5536_PCIID)
{
found = 1;
return 1;
}
return 0;
}
return found;
}
{
addr);
ret = (grub_uint64_t)
ret |= (((grub_uint64_t)
<< 32);
return ret;
}
void
{
addr);
val & 0xffffffff);
}
{
while (1)
{
return GRUB_ERR_NONE;
}
}
{
/* Send START. */
/* Send device address. */
if (err)
return err;
/* Send ACK. */
if (err)
return err;
/* Send byte address. */
/* Send START. */
if (err)
return err;
/* Send device address. */
if (err)
return err;
/* Send STOP. */
if (err)
return err;
if (err)
return err;
return GRUB_ERR_NONE;
}
{
/* FIXME */
if (!(smbbar & GRUB_CS5536_LBAR_ENABLE))
if (divisor < 8)
/* Disable SMB. */
/* Disable interrupts. */
/* Set as master. */
/* Launch. */
return GRUB_ERR_NONE;
}
struct grub_smbus_spd *res)
{
grub_uint8_t b;
if (err)
return err;
if (b == 0)
size = b;
((grub_uint8_t *) res)[0] = b;
{
if (err)
return err;
}
return GRUB_ERR_NONE;
}
static inline void
{
| (((grub_uint64_t) start
}
static inline void
{
| ((mask & GRUB_CS5536_IOD_ADDR_MASK)
}
static inline void
{
}
void
{
/* Enable more BARs. */
/* Setup DIVIL. */
#ifdef GRUB_MACHINE_MIPS_LOONGSON
switch (grub_arch_machine)
{
break;
break;
}
#endif
(~GRUB_CS5536_DIVIL_LPC_INTERRUPTS) & 0xffff);
/* Initialise USB controller. */
/* FIXME: assign adresses dynamically. */
| 0x05024000);
| (0x20ULL << GRUB_CS5536_MSR_USB_EHCI_BASE_FLDJ_SHIFT)
| 0x05023000);
| GRUB_CS5536_MSR_USB_BASE_MEMORY_ENABLE | 0x05020000);
GRUB_CS5536_MSR_USB_BASE_MEMORY_ENABLE | 0x05022000);
{
}
/* Setup IDE controller. */
/* Setup Geodelink PCI. */
| (4ULL << GRUB_CS5536_MSR_GL_PCI_CTRL_IN_THR_SHIFT)
| (8ULL << GRUB_CS5536_MSR_GL_PCI_CTRL_LATENCY_SHIFT)
/* Setup windows. */
}