Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100726
b: refs/heads/master
c: e7068ad
h: refs/heads/master
v: v3
  • Loading branch information
Lennert Buytenhek authored and Lennert Buytenhek committed Jun 22, 2008
1 parent a75939c commit 4ab83f8
Show file tree
Hide file tree
Showing 9 changed files with 133 additions and 142 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f91a8dcc25398c5d708056de081d6cebf3f2023e
refs/heads/master: e7068ad337a991fba627148a4a57939fdc1e6a2d
91 changes: 40 additions & 51 deletions trunk/arch/arm/mach-orion5x/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,22 @@ static struct map_desc orion5x_io_desc[] __initdata = {
.virtual = ORION5X_REGS_VIRT_BASE,
.pfn = __phys_to_pfn(ORION5X_REGS_PHYS_BASE),
.length = ORION5X_REGS_SIZE,
.type = MT_DEVICE
},
{
.type = MT_DEVICE,
}, {
.virtual = ORION5X_PCIE_IO_VIRT_BASE,
.pfn = __phys_to_pfn(ORION5X_PCIE_IO_PHYS_BASE),
.length = ORION5X_PCIE_IO_SIZE,
.type = MT_DEVICE
},
{
.type = MT_DEVICE,
}, {
.virtual = ORION5X_PCI_IO_VIRT_BASE,
.pfn = __phys_to_pfn(ORION5X_PCI_IO_PHYS_BASE),
.length = ORION5X_PCI_IO_SIZE,
.type = MT_DEVICE
},
{
.type = MT_DEVICE,
}, {
.virtual = ORION5X_PCIE_WA_VIRT_BASE,
.pfn = __phys_to_pfn(ORION5X_PCIE_WA_PHYS_BASE),
.length = ORION5X_PCIE_WA_SIZE,
.type = MT_DEVICE
.type = MT_DEVICE,
},
};

Expand All @@ -75,18 +72,15 @@ static struct resource orion5x_uart_resources[] = {
.start = UART0_PHYS_BASE,
.end = UART0_PHYS_BASE + 0xff,
.flags = IORESOURCE_MEM,
},
{
}, {
.start = IRQ_ORION5X_UART0,
.end = IRQ_ORION5X_UART0,
.flags = IORESOURCE_IRQ,
},
{
}, {
.start = UART1_PHYS_BASE,
.end = UART1_PHYS_BASE + 0xff,
.flags = IORESOURCE_MEM,
},
{
}, {
.start = IRQ_ORION5X_UART1,
.end = IRQ_ORION5X_UART1,
.flags = IORESOURCE_IRQ,
Expand All @@ -102,17 +96,16 @@ static struct plat_serial8250_port orion5x_uart_data[] = {
.iotype = UPIO_MEM,
.regshift = 2,
.uartclk = ORION5X_TCLK,
},
{
}, {
.mapbase = UART1_PHYS_BASE,
.membase = (char *)UART1_VIRT_BASE,
.irq = IRQ_ORION5X_UART1,
.flags = UPF_SKIP_TEST | UPF_BOOT_AUTOCONF,
.iotype = UPIO_MEM,
.regshift = 2,
.uartclk = ORION5X_TCLK,
}, {
},
{ },
};

static struct platform_device orion5x_uart = {
Expand All @@ -134,8 +127,7 @@ static struct resource orion5x_ehci0_resources[] = {
.start = ORION5X_USB0_PHYS_BASE,
.end = ORION5X_USB0_PHYS_BASE + SZ_4K - 1,
.flags = IORESOURCE_MEM,
},
{
}, {
.start = IRQ_ORION5X_USB0_CTRL,
.end = IRQ_ORION5X_USB0_CTRL,
.flags = IORESOURCE_IRQ,
Expand All @@ -147,8 +139,7 @@ static struct resource orion5x_ehci1_resources[] = {
.start = ORION5X_USB1_PHYS_BASE,
.end = ORION5X_USB1_PHYS_BASE + SZ_4K - 1,
.flags = IORESOURCE_MEM,
},
{
}, {
.start = IRQ_ORION5X_USB1_CTRL,
.end = IRQ_ORION5X_USB1_CTRL,
.flags = IORESOURCE_IRQ,
Expand Down Expand Up @@ -219,7 +210,7 @@ static struct resource orion5x_eth_resources[] = {
.start = IRQ_ORION5X_ETH_SUM,
.end = IRQ_ORION5X_ETH_SUM,
.flags = IORESOURCE_IRQ,
}
},
};

static struct platform_device orion5x_eth = {
Expand Down Expand Up @@ -251,16 +242,15 @@ static struct mv64xxx_i2c_pdata orion5x_i2c_pdata = {

static struct resource orion5x_i2c_resources[] = {
{
.name = "i2c base",
.start = I2C_PHYS_BASE,
.end = I2C_PHYS_BASE + 0x20 -1,
.flags = IORESOURCE_MEM,
},
{
.name = "i2c irq",
.start = IRQ_ORION5X_I2C,
.end = IRQ_ORION5X_I2C,
.flags = IORESOURCE_IRQ,
.name = "i2c base",
.start = I2C_PHYS_BASE,
.end = I2C_PHYS_BASE + 0x20 -1,
.flags = IORESOURCE_MEM,
}, {
.name = "i2c irq",
.start = IRQ_ORION5X_I2C,
.end = IRQ_ORION5X_I2C,
.flags = IORESOURCE_IRQ,
},
};

Expand All @@ -270,36 +260,35 @@ static struct platform_device orion5x_i2c = {
.num_resources = ARRAY_SIZE(orion5x_i2c_resources),
.resource = orion5x_i2c_resources,
.dev = {
.platform_data = &orion5x_i2c_pdata,
.platform_data = &orion5x_i2c_pdata,
},
};

/*****************************************************************************
* Sata port
****************************************************************************/
static struct resource orion5x_sata_resources[] = {
{
.name = "sata base",
.start = ORION5X_SATA_PHYS_BASE,
.end = ORION5X_SATA_PHYS_BASE + 0x5000 - 1,
.flags = IORESOURCE_MEM,
},
{
.name = "sata irq",
.start = IRQ_ORION5X_SATA,
.end = IRQ_ORION5X_SATA,
.flags = IORESOURCE_IRQ,
},
.name = "sata base",
.start = ORION5X_SATA_PHYS_BASE,
.end = ORION5X_SATA_PHYS_BASE + 0x5000 - 1,
.flags = IORESOURCE_MEM,
}, {
.name = "sata irq",
.start = IRQ_ORION5X_SATA,
.end = IRQ_ORION5X_SATA,
.flags = IORESOURCE_IRQ,
},
};

static struct platform_device orion5x_sata = {
.name = "sata_mv",
.id = 0,
.name = "sata_mv",
.id = 0,
.dev = {
.coherent_dma_mask = 0xffffffff,
},
.num_resources = ARRAY_SIZE(orion5x_sata_resources),
.resource = orion5x_sata_resources,
.num_resources = ARRAY_SIZE(orion5x_sata_resources),
.resource = orion5x_sata_resources,
};

void __init orion5x_sata_init(struct mv_sata_platform_data *sata_data)
Expand All @@ -319,7 +308,7 @@ static void orion5x_timer_init(void)
}

struct sys_timer orion5x_timer = {
.init = orion5x_timer_init,
.init = orion5x_timer_init,
};

/*****************************************************************************
Expand Down
13 changes: 5 additions & 8 deletions trunk/arch/arm/mach-orion5x/db88f5281-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ static struct platform_device db88f5281_boot_flash = {
.name = "physmap-flash",
.id = 0,
.dev = {
.platform_data = &db88f5281_boot_flash_data,
.platform_data = &db88f5281_boot_flash_data,
},
.num_resources = 1,
.resource = &db88f5281_boot_flash_resource,
Expand All @@ -110,7 +110,7 @@ static struct platform_device db88f5281_nor_flash = {
.name = "physmap-flash",
.id = 1,
.dev = {
.platform_data = &db88f5281_nor_flash_data,
.platform_data = &db88f5281_nor_flash_data,
},
.num_resources = 1,
.resource = &db88f5281_nor_flash_resource,
Expand All @@ -125,18 +125,15 @@ static struct mtd_partition db88f5281_nand_parts[] = {
.name = "kernel",
.offset = 0,
.size = SZ_2M,
},
{
}, {
.name = "root",
.offset = SZ_2M,
.size = (SZ_16M - SZ_2M),
},
{
}, {
.name = "user",
.offset = SZ_16M,
.size = SZ_8M,
},
{
}, {
.name = "recovery",
.offset = (SZ_16M + SZ_8M),
.size = SZ_8M,
Expand Down
33 changes: 18 additions & 15 deletions trunk/arch/arm/mach-orion5x/dns323-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ static struct mtd_partition dns323_partitions[] = {
.name = "u-boot",
.size = 0x00030000,
.offset = 0x007d0000,
}
},
};

static struct physmap_flash_data dns323_nor_flash_data = {
Expand All @@ -137,7 +137,9 @@ static struct resource dns323_nor_flash_resource = {
static struct platform_device dns323_nor_flash = {
.name = "physmap-flash",
.id = 0,
.dev = { .platform_data = &dns323_nor_flash_data, },
.dev = {
.platform_data = &dns323_nor_flash_data,
},
.resource = &dns323_nor_flash_resource,
.num_resources = 1,
};
Expand Down Expand Up @@ -170,7 +172,9 @@ static struct gpio_led_platform_data dns323_led_data = {
static struct platform_device dns323_gpio_leds = {
.name = "leds-gpio",
.id = -1,
.dev = { .platform_data = &dns323_led_data, },
.dev = {
.platform_data = &dns323_led_data,
},
};

/****************************************************************************
Expand All @@ -183,25 +187,26 @@ static struct gpio_keys_button dns323_buttons[] = {
.gpio = DNS323_GPIO_KEY_RESET,
.desc = "Reset Button",
.active_low = 1,
},
{
}, {
.code = KEY_POWER,
.gpio = DNS323_GPIO_KEY_POWER,
.desc = "Power Button",
.active_low = 1,
}
},
};

static struct gpio_keys_platform_data dns323_button_data = {
.buttons = dns323_buttons,
.nbuttons = ARRAY_SIZE(dns323_buttons),
.nbuttons = ARRAY_SIZE(dns323_buttons),
};

static struct platform_device dns323_button_device = {
.name = "gpio-keys",
.id = -1,
.num_resources = 0,
.dev = { .platform_data = &dns323_button_data, },
.dev = {
.platform_data = &dns323_button_data,
},
};

/****************************************************************************
Expand All @@ -225,17 +230,15 @@ static struct platform_device *dns323_plat_devices[] __initdata = {
static struct i2c_board_info __initdata dns323_i2c_devices[] = {
{
I2C_BOARD_INFO("g760a", 0x3e),
},
#if 0
/* this entry requires the new-style driver model lm75 driver,
* for the meantime "insmod lm75.ko force_lm75=0,0x48" is needed */
{
}, {
I2C_BOARD_INFO("g751", 0x48),
},
#endif
{
}, {
I2C_BOARD_INFO("m41t80", 0x68),
}
},
};

/* DNS-323 specific power off method */
Expand Down Expand Up @@ -292,8 +295,8 @@ static void __init dns323_init(void)
orion5x_gpio_set_valid_pins(0x07f6);

/* register dns323 specific power-off method */
if ((gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0)
|| (gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0))
if (gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0 ||
gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0)
pr_err("DNS323: failed to setup power-off GPIO\n");

pm_power_off = dns323_power_off;
Expand Down
8 changes: 3 additions & 5 deletions trunk/arch/arm/mach-orion5x/kurobox_pro-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,11 @@ static struct mtd_partition kurobox_pro_nand_parts[] = {
.name = "uImage",
.offset = 0,
.size = SZ_4M,
},
{
}, {
.name = "rootfs",
.offset = SZ_4M,
.size = SZ_64M,
},
{
}, {
.name = "extra",
.offset = SZ_4M + SZ_64M,
.size = SZ_256M - (SZ_4M + SZ_64M),
Expand Down Expand Up @@ -175,7 +173,7 @@ static struct i2c_board_info __initdata kurobox_pro_i2c_rtc = {
* SATA
****************************************************************************/
static struct mv_sata_platform_data kurobox_pro_sata_data = {
.n_ports = 2,
.n_ports = 2,
};

/*****************************************************************************
Expand Down
14 changes: 7 additions & 7 deletions trunk/arch/arm/mach-orion5x/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,13 @@ static int __init pcie_setup(struct pci_sys_data *sys)
* PCI Address Decode Windows registers
*/
#define PCI_BAR_SIZE_DDR_CS(n) (((n) == 0) ? ORION5X_PCI_REG(0xc08) : \
((n) == 1) ? ORION5X_PCI_REG(0xd08) : \
((n) == 2) ? ORION5X_PCI_REG(0xc0c) : \
((n) == 3) ? ORION5X_PCI_REG(0xd0c) : 0)
#define PCI_BAR_REMAP_DDR_CS(n) (((n) ==0) ? ORION5X_PCI_REG(0xc48) : \
((n) == 1) ? ORION5X_PCI_REG(0xd48) : \
((n) == 2) ? ORION5X_PCI_REG(0xc4c) : \
((n) == 3) ? ORION5X_PCI_REG(0xd4c) : 0)
((n) == 1) ? ORION5X_PCI_REG(0xd08) : \
((n) == 2) ? ORION5X_PCI_REG(0xc0c) : \
((n) == 3) ? ORION5X_PCI_REG(0xd0c) : 0)
#define PCI_BAR_REMAP_DDR_CS(n) (((n) == 0) ? ORION5X_PCI_REG(0xc48) : \
((n) == 1) ? ORION5X_PCI_REG(0xd48) : \
((n) == 2) ? ORION5X_PCI_REG(0xc4c) : \
((n) == 3) ? ORION5X_PCI_REG(0xd4c) : 0)
#define PCI_BAR_ENABLE ORION5X_PCI_REG(0xc3c)
#define PCI_ADDR_DECODE_CTRL ORION5X_PCI_REG(0xd3c)

Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/arm/mach-orion5x/rd88f5182-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ static int __init rd88f5182_dbgled_init(void)

leds_event = rd88f5182_dbgled_event;
}

return 0;
}

Expand Down Expand Up @@ -234,7 +235,7 @@ static struct i2c_board_info __initdata rd88f5182_i2c_rtc = {
* Sata
****************************************************************************/
static struct mv_sata_platform_data rd88f5182_sata_data = {
.n_ports = 2,
.n_ports = 2,
};

/*****************************************************************************
Expand Down
Loading

0 comments on commit 4ab83f8

Please sign in to comment.