20 #include <asm/bootinfo.h>
31 static void __init db1550_hw_setup(
void)
59 unsigned short whoami;
70 pr_info(
"Alchemy/AMD %s Board, CPLD Rev %d Board-ID %d " \
72 (whoami >> 4) & 0xf, (whoami >> 8) & 0xf, whoami & 0xf);
90 .parts = db1550_spiflash_parts,
99 .max_speed_hz = 2400000,
106 .modalias =
"m25p80",
107 .max_speed_hz = 2400000,
111 .platform_data = &db1550_spiflash_data,
123 static void au1550_nand_cmd_ctrl(
struct mtd_info *mtd,
int cmd,
129 ioaddr &= 0xffffff00;
146 static int au1550_nand_device_ready(
struct mtd_info *mtd)
155 .size = 8 * 1024 * 1024,
168 .nr_partitions =
ARRAY_SIZE(db1550_nand_parts),
169 .partitions = db1550_nand_parts,
173 .dev_ready = au1550_nand_device_ready,
174 .cmd_ctrl = au1550_nand_cmd_ctrl,
178 static struct resource db1550_nand_res[] = {
189 .resource = db1550_nand_res,
197 .parts = db1550_nand_parts,
203 .name =
"au1550-nand",
205 .resource = db1550_nand_res,
208 .platform_data = &pb1550_nand_pd,
212 static void __init pb1550_nand_setup(
void)
214 int boot_swapboot = (au_readl(
MEM_STSTAT) & (0x7 << 1)) |
218 switch (boot_swapboot) {
219 case 0:
case 2:
case 8:
case 0xC:
case 0xD:
223 case 1:
case 3:
case 9:
case 0xE:
case 0xF:
231 static struct resource au1550_psc0_res[] = {
263 .mainclk_hz = 48000000,
265 .activate_cs = db1550_spi_cs_en,
272 .dma_mask = &spi_dmamask,
274 .platform_data = &db1550_spi_platdata,
276 .name =
"au1550-spi",
279 .resource = au1550_psc0_res,
284 static struct resource au1550_psc1_res[] = {
308 .name =
"au1xpsc_ac97",
311 .resource = au1550_psc1_res,
315 static struct resource au1550_psc2_res[] = {
339 .name =
"au1xpsc_smbus",
342 .resource = au1550_psc2_res,
347 static struct resource au1550_psc3_res[] = {
371 .name =
"au1xpsc_i2s",
374 .resource = au1550_psc3_res,
380 .name =
"ac97-codec",
385 .name =
"au1xpsc-pcm",
390 .name =
"au1xpsc-pcm",
395 .name =
"db1550-ac97",
399 .name =
"db1550-i2s",
406 if ((slot < 11) || (slot > 13) || pin == 0)
429 static int pb1550_map_pci_irq(
const struct pci_dev *d,
u8 slot,
u8 pin)
431 if ((slot < 12) || (slot > 13) || pin == 0)
452 static struct resource alchemy_pci_host_res[] = {
461 .board_map_irq = db1550_map_pci_irq,
465 .dev.platform_data = &db1550_pci_pd,
466 .name =
"alchemy-pci",
468 .num_resources =
ARRAY_SIZE(alchemy_pci_host_res),
469 .resource = alchemy_pci_host_res,
494 static void __init db1550_devices(
void)
496 alchemy_gpio_direction_output(203, 0);
527 alchemy_gpio_direction_output(202, 0);
530 static void __init pb1550_devices(
void)
537 alchemy_gpio2_enable_int(201);
538 alchemy_gpio2_enable_int(202);
594 id ? pb1550_devices() : db1550_devices();