Set num_resources for rtc7301 platform device.
[openwrt.git] / target / linux / ixp4xx / patches-2.6.26 / 110-pronghorn_series_support.patch
index a35663a9b0872ffbb11d8b5b78b508dc6e65de65..dcfb65033f597d4654cfa64b6e647c4a7b5590b8 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/arm/configs/ixp4xx_defconfig
 +++ b/arch/arm/configs/ixp4xx_defconfig
-@@ -157,6 +157,8 @@
+@@ -157,6 +157,8 @@ CONFIG_ARCH_ADI_COYOTE=y
  CONFIG_MACH_GATEWAY7001=y
  CONFIG_MACH_WG302V1=y
  CONFIG_MACH_WG302V2=y
@@ -11,7 +11,7 @@
  CONFIG_MACH_IXDP465=y
 --- a/arch/arm/mach-ixp4xx/Kconfig
 +++ b/arch/arm/mach-ixp4xx/Kconfig
-@@ -65,6 +65,24 @@
+@@ -65,6 +65,22 @@ config MACH_WG302V2
          WG302 v2 or WAG302 v2 Access Points. For more information
          on this platform, see http://openwrt.org
  
 +# CF slot connected to the expansion bus, so we just enable them together.
 +#
 +config MACH_PRONGHORNMETRO
-+      bool 
-+      depends on MACH_PRONGHORN
-+      default y
++      def_bool MACH_PRONGHORN
 +
  config ARCH_IXDP425
        bool "IXDP425"
        help
 --- a/arch/arm/mach-ixp4xx/Makefile
 +++ b/arch/arm/mach-ixp4xx/Makefile
-@@ -17,6 +17,7 @@
+@@ -17,6 +17,7 @@ obj-pci-$(CONFIG_MACH_GATEWAY7001)   += ga
  obj-pci-$(CONFIG_MACH_WG302V1)                += wg302v1-pci.o
  obj-pci-$(CONFIG_MACH_WG302V2)                += wg302v2-pci.o
  obj-pci-$(CONFIG_MACH_FSG)            += fsg-pci.o
@@ -46,7 +44,7 @@
  
  obj-y += common.o
  
-@@ -32,6 +33,7 @@
+@@ -32,6 +33,7 @@ obj-$(CONFIG_MACH_GATEWAY7001)       += gatewa
  obj-$(CONFIG_MACH_WG302V1)    += wg302v1-setup.o
  obj-$(CONFIG_MACH_WG302V2)    += wg302v2-setup.o
  obj-$(CONFIG_MACH_FSG)                += fsg-setup.o
 +#include <linux/types.h>
 +#include <linux/memory.h>
 +#include <linux/i2c-gpio.h>
++#include <linux/leds.h>
 +
 +#include <asm/setup.h>
 +#include <asm/hardware.h>
 +      {
 +              .name           = "pronghorn:green:status",
 +              .gpio           = 7,
-+      },
-+      { },
++      }
 +};
 +
 +static struct gpio_led_platform_data pronghorn_led_data = {
-+      .num_leds               = ARRAY_SIZE(pronghorn_led_pin),
++      .num_leds               = 1,
 +      .leds                   = pronghorn_led_pin,
 +};
 +
 +      ixp4xx_sys_init();
 +
 +      pronghorn_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
-+      pronghorn_flash_resource.end = IXP4XX_EXP_BUS_BASE(0) + SZ_16M - 1;
++      pronghorn_flash_resource.end = IXP4XX_EXP_BUS_BASE(0) + SZ_32M - 1;
 +
 +      *IXP4XX_EXP_CS0 |= IXP4XX_FLASH_WRITABLE;
 +      *IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0;
 +      platform_add_devices(pronghorn_devices, ARRAY_SIZE(pronghorn_devices));
 +
 +      if (machine_is_pronghorn()) {
-+              pronghorn_pata_resources[0].start = IXP4XX_EXP_BUS_BASE(3);
-+              pronghorn_pata_resources[0].end = IXP4XX_EXP_BUS_END(3);
-+
-+              pronghorn_pata_resources[1].start = IXP4XX_EXP_BUS_BASE(4);
-+              pronghorn_pata_resources[1].end = IXP4XX_EXP_BUS_END(4);
-+
-+              pronghorn_pata_data.cs0_cfg = IXP4XX_EXP_CS3;
-+              pronghorn_pata_data.cs1_cfg = IXP4XX_EXP_CS4;
-+      } else {
 +              pronghorn_pata_resources[0].start = IXP4XX_EXP_BUS_BASE(2);
 +              pronghorn_pata_resources[0].end = IXP4XX_EXP_BUS_END(2);
 +
 +
 +              pronghorn_pata_data.cs0_cfg = IXP4XX_EXP_CS2;
 +              pronghorn_pata_data.cs1_cfg = IXP4XX_EXP_CS3;
++      } else {
++              pronghorn_pata_resources[0].start = IXP4XX_EXP_BUS_BASE(3);
++              pronghorn_pata_resources[0].end = IXP4XX_EXP_BUS_END(3);
++
++              pronghorn_pata_resources[1].start = IXP4XX_EXP_BUS_BASE(4);
++              pronghorn_pata_resources[1].end = IXP4XX_EXP_BUS_END(4);
++
++              pronghorn_pata_data.cs0_cfg = IXP4XX_EXP_CS3;
++              pronghorn_pata_data.cs1_cfg = IXP4XX_EXP_CS4;
 +
 +              platform_device_register(&pronghorn_i2c_gpio);
 +      }
 +MACHINE_END
 --- a/include/asm-arm/arch-ixp4xx/uncompress.h
 +++ b/include/asm-arm/arch-ixp4xx/uncompress.h
-@@ -41,7 +41,8 @@
+@@ -41,7 +41,8 @@ static __inline__ void __arch_decomp_set
         * Some boards are using UART2 as console
         */
        if (machine_is_adi_coyote() || machine_is_gtwx5715() ||