if (gpio_request(pin, "PCI IntA") == 0) {
if (gpio_direction_input(pin) == 0) {
irq = gpio_to_irq(pin);
- set_irq_type(irq, IRQ_TYPE_LEVEL_LOW);
+ irq_set_irq_type(irq, IRQ_TYPE_LEVEL_LOW);
printk (KERN_INFO "PCI IntA IRQ: %d\n", irq);
} else {
printk(KERN_ERR "dt2_pci_preinit failed to "
- "set_irq_type pin %d\n", pin);
+ "irq_set_irq_type pin %d\n", pin);
gpio_free(pin);
}
} else {
if (gpio_request(pin, "PCI IntB") == 0) {
if (gpio_direction_input(pin) == 0) {
irq = gpio_to_irq(pin);
- set_irq_type(irq, IRQ_TYPE_LEVEL_LOW);
+ irq_set_irq_type(irq, IRQ_TYPE_LEVEL_LOW);
printk (KERN_INFO "PCI IntB IRQ: %d\n", irq);
} else {
printk(KERN_ERR "dt2_pci_preinit failed to "
- "set_irq_type pin %d\n", pin);
+ "irq_set_irq_type pin %d\n", pin);
gpio_free(pin);
}
} else {
.duplex = DUPLEX_FULL,
};
-static struct dsa_platform_data dt2_switch_data = {
+static struct dsa_chip_data dt2_switch_chip_data = {
.port_names[0] = "wan",
.port_names[1] = "lan1",
.port_names[2] = "lan2",
.port_names[5] = "lan4",
};
+static struct dsa_platform_data dt2_switch_plat_data = {
+ .nr_chips = 1,
+ .chip = &dt2_switch_chip_data,
+};
+
/*****************************************************************************
* RTC ISL1208 on I2C bus
****************************************************************************/
/*****************************************************************************
* General Setup
****************************************************************************/
-static struct orion5x_mpp_mode dt2_mpp_modes[] __initdata = {
- { 0, MPP_GPIO }, // RTC interrupt
- { 1, MPP_GPIO }, // 88e6131 interrupt
- { 2, MPP_GPIO }, // PCI_intB
- { 3, MPP_GPIO }, // PCI_intA
- { 4, MPP_GPIO }, // reset button switch
- { 5, MPP_GPIO },
- { 6, MPP_GPIO },
- { 7, MPP_GPIO },
- { 8, MPP_GPIO },
- { 9, MPP_GIGE }, /* GE_RXERR */
- { 10, MPP_GPIO }, // usb
- { 11, MPP_GPIO }, // usb
- { 12, MPP_GIGE }, // GE_TXD[4]
- { 13, MPP_GIGE }, // GE_TXD[5]
- { 14, MPP_GIGE }, // GE_TXD[6]
- { 15, MPP_GIGE }, // GE_TXD[7]
- { 16, MPP_GIGE }, // GE_RXD[4]
- { 17, MPP_GIGE }, // GE_RXD[5]
- { 18, MPP_GIGE }, // GE_RXD[6]
- { 19, MPP_GIGE }, // GE_RXD[7]
- { -1 },
+static unsigned int dt2_mpp_modes[] __initdata = {
+ MPP0_GPIO, // RTC interrupt
+ MPP1_GPIO, // 88e6131 interrupt
+ MPP2_GPIO, // PCI_intB
+ MPP3_GPIO, // PCI_intA
+ MPP4_GPIO, // reset button switch
+ MPP5_GPIO,
+ MPP6_GPIO,
+ MPP7_GPIO,
+ MPP8_GPIO,
+ MPP9_GIGE, /* GE_RXERR */
+ MPP10_GPIO, // usb
+ MPP11_GPIO, // usb
+ MPP12_GIGE, // GE_TXD[4]
+ MPP13_GIGE, // GE_TXD[5]
+ MPP14_GIGE, // GE_TXD[6]
+ MPP15_GIGE, // GE_TXD[7]
+ MPP16_GIGE, // GE_RXD[4]
+ MPP17_GIGE, // GE_RXD[5]
+ MPP18_GIGE, // GE_RXD[6]
+ MPP19_GIGE, // GE_RXD[7]
+ 0,
};
/*****************************************************************************
static void __init dt2_init(void)
{
- DECLARE_MAC_BUF(mac_buf);
/*
* Setup basic Orion functions. Need to be called early.
*/
/*
* Configure peripherals.
*/
- gpio_display();
orion5x_uart0_init();
orion5x_ehci0_init();
printk(KERN_INFO "Serial: %s\n", dt2_eeprom.fc.dt2_serial_number);
printk(KERN_INFO "Revision: %016x\n", dt2_eeprom.fc.dt2_revision);
- printk(KERN_INFO "DT2: Using MAC address %s for port 0\n",
- print_mac(mac_buf, dt2_eeprom.gw.mac_addr[0]));
- printk(KERN_INFO "DT2: Using MAC address %s for port 1\n",
- print_mac(mac_buf, dt2_eeprom.gw.mac_addr[1]));
+ printk(KERN_INFO "DT2: Using MAC address %pM for port 0\n",
+ dt2_eeprom.gw.mac_addr[0]);
+ printk(KERN_INFO "DT2: Using MAC address %pM for port 1\n",
+ dt2_eeprom.gw.mac_addr[1]);
orion5x_eth_init(&dt2_eth_data);
memcpy(dt2_eth_data.mac_addr, dt2_eeprom.gw.mac_addr[0], 6);
- orion5x_eth_switch_init(&dt2_switch_data, NO_IRQ);
+ orion5x_eth_switch_init(&dt2_switch_plat_data, NO_IRQ);
i2c_register_board_info(0, &dt2_i2c_rtc, 1);
/* Warning: Freecom uses their own custom bootloader with mach-type (=1500) */
MACHINE_START(DT2, "Freecom DataTank Gateway")
/* Maintainer: Zintis Petersons <Zintis.Petersons@abcsolutions.lv> */
- .phys_io = ORION5X_REGS_PHYS_BASE,
- .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC,
.boot_params = 0x00000100,
.init_machine = dt2_init,
.map_io = orion5x_map_io,