static int __init sh_mv_setup(char **cmdline_p) { #if defined(CONFIG_SH_UNKNOWN) extern struct sh_machine_vector mv_unknown; #endif struct sh_machine_vector *mv = NULL; char mv_name[MV_NAME_SIZE] = ""; unsigned long mv_io_base = 0; int mv_mmio_enable = 0; parse_cmdline(cmdline_p, mv_name, &mv, &mv_io_base, &mv_mmio_enable); #ifdef CONFIG_SH_GENERIC if (mv == NULL) { mv = &mv_unknown; if (*mv_name != '\0') { printk("Warning: Unsupported machine %s, using unknown\n", mv_name); } } sh_mv = *mv; #endif #ifdef CONFIG_SH_UNKNOWN sh_mv = mv_unknown; #endif /* * Manually walk the vec, fill in anything that the board hasn't yet * by hand, wrapping to the generic implementation. */ #define mv_set(elem) do { \ if (!sh_mv.mv_##elem) \ sh_mv.mv_##elem = generic_##elem; \ } while (0) mv_set(inb); mv_set(inw); mv_set(inl); mv_set(outb); mv_set(outw); mv_set(outl); mv_set(inb_p); mv_set(inw_p); mv_set(inl_p); mv_set(outb_p); mv_set(outw_p); mv_set(outl_p); mv_set(insb); mv_set(insw); mv_set(insl); mv_set(outsb); mv_set(outsw); mv_set(outsl); mv_set(readb); mv_set(readw); mv_set(readl); mv_set(writeb); mv_set(writew); mv_set(writel); mv_set(ioremap); mv_set(iounmap); mv_set(isa_port2addr); mv_set(irq_demux); #ifdef CONFIG_SH_UNKNOWN __set_io_port_base(mv_io_base); #endif return 0; }
void __init sh_mv_setup(void) { /* * Only overload the machvec if one hasn't been selected on * the command line with sh_mv= */ if (!machvec_selected) { unsigned long machvec_size; machvec_size = ((unsigned long)&__machvec_end - (unsigned long)&__machvec_start); /* * Sanity check for machvec section alignment. Ensure * __initmv hasn't been misused. */ if (machvec_size % sizeof(struct sh_machine_vector)) panic("machvec misaligned, invalid __initmv use?"); /* * If the machvec hasn't been preselected, use the first * vector (usually the only one) from .machvec.init. */ if (machvec_size >= sizeof(struct sh_machine_vector)) sh_mv = *(struct sh_machine_vector *)&__machvec_start; } printk(KERN_NOTICE "Booting machvec: %s\n", get_system_type()); /* * Manually walk the vec, fill in anything that the board hasn't yet * by hand, wrapping to the generic implementation. */ #define mv_set(elem) do { \ if (!sh_mv.mv_##elem) \ sh_mv.mv_##elem = generic_##elem; \ } while (0) mv_set(inb); mv_set(inw); mv_set(inl); mv_set(outb); mv_set(outw); mv_set(outl); mv_set(inb_p); mv_set(inw_p); mv_set(inl_p); mv_set(outb_p); mv_set(outw_p); mv_set(outl_p); mv_set(insb); mv_set(insw); mv_set(insl); mv_set(outsb); mv_set(outsw); mv_set(outsl); mv_set(ioport_map); mv_set(ioport_unmap); mv_set(irq_demux); mv_set(mode_pins); if (!sh_mv.mv_nr_irqs) sh_mv.mv_nr_irqs = NR_IRQS; __set_io_port_base(P2SEG); }
static void __init mpc1211_setup(char **cmdline_p) { unsigned char spd_buf[128]; __set_io_port_base(PA_PCI_IO); pci_write_config(0,0,0,0x54, 0xb0b00000); do { outb(ALI15X3_ABORT, SMBHSTCNT); spd_buf[0] = 0x0c; spd_buf[1] = 0x43; spd_buf[2] = 0x7f; spd_buf[3] = 0x03; spd_buf[4] = 0x00; spd_buf[5] = 0x03; spd_buf[6] = 0x00; } while (put_smb_blk(spd_buf, 0x69, 0, 7) < 0); board_time_init = mpc1211_time_init; return 0; }
static void __init dreamcast_setup(char **cmdline_p) { int i; /* Mask all hardware events */ /* XXX */ /* Acknowledge any previous events */ /* XXX */ __set_io_port_base(0xa0000000); /* Assign all virtual IRQs to the System ASIC int. handler */ for (i = HW_EVENT_IRQ_BASE; i < HW_EVENT_IRQ_MAX; i++) irq_desc[i].chip = &systemasic_int; board_time_init = aica_time_init; #ifdef CONFIG_PCI if (gapspci_init() < 0) printk(KERN_WARNING "GAPSPCI was not detected.\n"); #endif }
static void __init shmin_setup(char **cmdline_p) { __set_io_port_base(SHMIN_IO_BASE); }
int __init pcibios_init_platform(void) { __set_io_port_base(SH7751_PCI_IO_BASE); return sh7751_pcic_init(&sh7751_pci_map); }