ar71xx: remove static MTD maps from AP121/DB120 boards
authorGabor Juhos <juhosg@openwrt.org>
Mon, 19 Mar 2012 11:11:19 +0000 (11:11 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Mon, 19 Mar 2012 11:11:19 +0000 (11:11 +0000)
SVN-Revision: 31016

target/linux/ar71xx/patches-3.2/603-MIPS-ath79-ap121-fixes.patch
target/linux/ar71xx/patches-3.2/605-MIPS-ath79-db120-fixes.patch
target/linux/ar71xx/patches-3.3/603-MIPS-ath79-ap121-fixes.patch
target/linux/ar71xx/patches-3.3/605-MIPS-ath79-db120-fixes.patch

index b8583d5a3b53769c4075dea92b27edf4974a4245..9772a84d21537a352d5b64dd7f53492c78595c9c 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/ath79/mach-ap121.c
 +++ b/arch/mips/ath79/mach-ap121.c
-@@ -1,19 +1,23 @@
+@@ -1,19 +1,21 @@
  /*
   *  Atheros AP121 board support
   *
@@ -11,8 +11,6 @@
   *  under the terms of the GNU General Public License version 2 as published
   *  by the Free Software Foundation.
   */
-+#include <linux/mtd/mtd.h>
-+#include <linux/mtd/partitions.h>
  
 -#include "machtypes.h"
 +#include "dev-eth.h"
@@ -26,7 +24,7 @@
  
  #define AP121_GPIO_LED_WLAN           0
  #define AP121_GPIO_LED_USB            1
-@@ -24,7 +28,82 @@
+@@ -24,7 +26,14 @@
  #define AP121_KEYS_POLL_INTERVAL      20      /* msecs */
  #define AP121_KEYS_DEBOUNCE_INTERVAL  (3 * AP121_KEYS_POLL_INTERVAL)
  
 +#define AP121_MINI_GPIO_LED_WLAN      0
 +#define AP121_MINI_GPIO_BTN_JUMPSTART 12
 +#define AP121_MINI_GPIO_BTN_RESET     11
-+
-+static struct mtd_partition ap121_parts[] = {
-+      {
-+              .name           = "u-boot",
-+              .offset         = 0,
-+              .size           = 0x010000,
-+              .mask_flags     = MTD_WRITEABLE,
-+      },
-+      {
-+              .name           = "rootfs",
-+              .offset         = 0x010000,
-+              .size           = 0x130000,
-+      },
-+      {
-+              .name           = "uImage",
-+              .offset         = 0x140000,
-+              .size           = 0x0a0000,
-+      },
-+      {
-+              .name           = "NVRAM",
-+              .offset         = 0x1e0000,
-+              .size           = 0x010000,
-+      },
-+      {
-+              .name           = "ART",
-+              .offset         = 0x1f0000,
-+              .size           = 0x010000,
-+              .mask_flags     = MTD_WRITEABLE,
-+      },
-+};
-+
-+static struct mtd_partition ap121_mini_parts[] = {
-+      {
-+              .name           = "u-boot",
-+              .offset         = 0,
-+              .size           = 0x040000,
-+              .mask_flags     = MTD_WRITEABLE,
-+      },
-+      {
-+              .name           = "u-boot-env",
-+              .offset         = 0x040000,
-+              .size           = 0x010000,
-+              .mask_flags     = MTD_WRITEABLE,
-+      },
-+      {
-+              .name           = "rootfs",
-+              .offset         = 0x050000,
-+              .size           = 0x2b0000,
-+      },
-+      {
-+              .name           = "uImage",
-+              .offset         = 0x300000,
-+              .size           = 0x0e0000,
-+      },
-+      {
-+              .name           = "NVRAM",
-+              .offset         = 0x3e0000,
-+              .size           = 0x010000,
-+      },
-+      {
-+              .name           = "ART",
-+              .offset         = 0x3f0000,
-+              .size           = 0x010000,
-+              .mask_flags     = MTD_WRITEABLE,
-+      },
-+};
-+
-+static struct flash_platform_data ap121_flash_data;
  
  static struct gpio_led ap121_leds_gpio[] __initdata = {
        {
-@@ -58,41 +137,84 @@ static struct gpio_keys_button ap121_gpi
+@@ -58,41 +67,78 @@ static struct gpio_keys_button ap121_gpi
        }
  };
  
  };
  
 -static struct spi_board_info ap121_spi_info[] = {
--      {
++static struct gpio_keys_button ap121_mini_gpio_keys[] __initdata = {
+       {
 -              .bus_num        = 0,
 -              .chip_select    = 0,
 -              .max_speed_hz   = 25000000,
 -              .modalias       = "mx25l1606e",
 -              .controller_data = &ap121_spi0_data,
-+static struct gpio_keys_button ap121_mini_gpio_keys[] __initdata = {
-+      {
 +              .desc           = "jumpstart button",
 +              .type           = EV_KEY,
 +              .code           = KEY_WPS_BUTTON,
 +{
 +      u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
 +
-+      ath79_register_m25p80(&ap121_flash_data);
++      ath79_register_m25p80(NULL);
 +      ath79_register_wmac(art + AP121_CALDATA_OFFSET,
 +                          art + AP121_WMAC_MAC_OFFSET);
 +
  static void __init ap121_setup(void)
  {
 -      u8 *cal_data = (u8 *) KSEG1ADDR(AP121_CAL_DATA_ADDR);
-+      ap121_flash_data.parts = ap121_parts;
-+      ap121_flash_data.nr_parts = ARRAY_SIZE(ap121_parts);
-+
 +      ap121_common_setup();
  
        ath79_register_leds_gpio(-1, ARRAY_SIZE(ap121_leds_gpio),
 +
 +static void __init ap121_mini_setup(void)
 +{
-+      ap121_flash_data.parts = ap121_mini_parts;
-+      ap121_flash_data.nr_parts = ARRAY_SIZE(ap121_mini_parts);
-+
 +      ap121_common_setup();
 +
 +      ath79_register_leds_gpio(-1, ARRAY_SIZE(ap121_mini_leds_gpio),
index 4f9d00bc1d5021d373d2336d7deaef31d5fdd6b2..a758dc095064c90db3b68f0c579a917ce3b611a9 100644 (file)
@@ -9,12 +9,9 @@
   *
   * All rights reserved.
   *
-@@ -37,17 +37,28 @@
-  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+@@ -38,16 +38,25 @@
   */
  
-+#include <linux/mtd/mtd.h>
-+#include <linux/mtd/partitions.h>
  #include <linux/pci.h>
 +#include <linux/phy.h>
 +#include <linux/platform_device.h>
@@ -40,7 +37,7 @@
  #define DB120_GPIO_LED_WLAN_5G                12
  #define DB120_GPIO_LED_WLAN_2G                13
  #define DB120_GPIO_LED_STATUS         14
-@@ -58,8 +69,50 @@
+@@ -58,8 +67,10 @@
  #define DB120_KEYS_POLL_INTERVAL      20      /* msecs */
  #define DB120_KEYS_DEBOUNCE_INTERVAL  (3 * DB120_KEYS_POLL_INTERVAL)
  
 +#define DB120_MAC1_OFFSET             6
 +#define DB120_WMAC_CALDATA_OFFSET     0x1000
 +#define DB120_PCIE_CALDATA_OFFSET     0x5000
-+
-+static struct mtd_partition db120_partitions[] = {
-+      {
-+              .name           = "u-boot",
-+              .offset         = 0,
-+              .size           = 0x040000,
-+              .mask_flags     = MTD_WRITEABLE,
-+      },
-+      {
-+              .name           = "u-boot-env",
-+              .offset         = 0x040000,
-+              .size           = 0x010000,
-+      },
-+      {
-+              .name           = "rootfs",
-+              .offset         = 0x050000,
-+              .size           = 0x630000,
-+      },
-+      {
-+              .name           = "uImage",
-+              .offset         = 0x680000,
-+              .size           = 0x160000,
-+      },
-+      {
-+              .name           = "NVRAM",
-+              .offset         = 0x7E0000,
-+              .size           = 0x010000,
-+      },
-+      {
-+              .name           = "ART",
-+              .offset         = 0x7F0000,
-+              .size           = 0x010000,
-+              .mask_flags     = MTD_WRITEABLE,
-+      }
-+};
-+
-+static struct flash_platform_data db120_flash_data = {
-+      .parts          = db120_partitions,
-+      .nr_parts       = ARRAY_SIZE(db120_partitions),
-+};
  
  static struct gpio_led db120_leds_gpio[] __initdata = {
        {
-@@ -82,6 +135,11 @@ static struct gpio_led db120_leds_gpio[]
+@@ -82,6 +93,11 @@ static struct gpio_led db120_leds_gpio[]
                .gpio           = DB120_GPIO_LED_WLAN_2G,
                .active_low     = 1,
        },
  };
  
  static struct gpio_keys_button db120_gpio_keys[] __initdata = {
-@@ -95,66 +153,89 @@ static struct gpio_keys_button db120_gpi
+@@ -95,66 +111,89 @@ static struct gpio_keys_button db120_gpi
        },
  };
  
        u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
  
 +      ath79_gpio_output_select(DB120_GPIO_LED_USB, AR934X_GPIO_OUT_GPIO);
-+      ath79_register_m25p80(&db120_flash_data);
++      ath79_register_m25p80(NULL);
 +
        ath79_register_leds_gpio(-1, ARRAY_SIZE(db120_leds_gpio),
                                 db120_leds_gpio);
index b8583d5a3b53769c4075dea92b27edf4974a4245..9772a84d21537a352d5b64dd7f53492c78595c9c 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/ath79/mach-ap121.c
 +++ b/arch/mips/ath79/mach-ap121.c
-@@ -1,19 +1,23 @@
+@@ -1,19 +1,21 @@
  /*
   *  Atheros AP121 board support
   *
@@ -11,8 +11,6 @@
   *  under the terms of the GNU General Public License version 2 as published
   *  by the Free Software Foundation.
   */
-+#include <linux/mtd/mtd.h>
-+#include <linux/mtd/partitions.h>
  
 -#include "machtypes.h"
 +#include "dev-eth.h"
@@ -26,7 +24,7 @@
  
  #define AP121_GPIO_LED_WLAN           0
  #define AP121_GPIO_LED_USB            1
-@@ -24,7 +28,82 @@
+@@ -24,7 +26,14 @@
  #define AP121_KEYS_POLL_INTERVAL      20      /* msecs */
  #define AP121_KEYS_DEBOUNCE_INTERVAL  (3 * AP121_KEYS_POLL_INTERVAL)
  
 +#define AP121_MINI_GPIO_LED_WLAN      0
 +#define AP121_MINI_GPIO_BTN_JUMPSTART 12
 +#define AP121_MINI_GPIO_BTN_RESET     11
-+
-+static struct mtd_partition ap121_parts[] = {
-+      {
-+              .name           = "u-boot",
-+              .offset         = 0,
-+              .size           = 0x010000,
-+              .mask_flags     = MTD_WRITEABLE,
-+      },
-+      {
-+              .name           = "rootfs",
-+              .offset         = 0x010000,
-+              .size           = 0x130000,
-+      },
-+      {
-+              .name           = "uImage",
-+              .offset         = 0x140000,
-+              .size           = 0x0a0000,
-+      },
-+      {
-+              .name           = "NVRAM",
-+              .offset         = 0x1e0000,
-+              .size           = 0x010000,
-+      },
-+      {
-+              .name           = "ART",
-+              .offset         = 0x1f0000,
-+              .size           = 0x010000,
-+              .mask_flags     = MTD_WRITEABLE,
-+      },
-+};
-+
-+static struct mtd_partition ap121_mini_parts[] = {
-+      {
-+              .name           = "u-boot",
-+              .offset         = 0,
-+              .size           = 0x040000,
-+              .mask_flags     = MTD_WRITEABLE,
-+      },
-+      {
-+              .name           = "u-boot-env",
-+              .offset         = 0x040000,
-+              .size           = 0x010000,
-+              .mask_flags     = MTD_WRITEABLE,
-+      },
-+      {
-+              .name           = "rootfs",
-+              .offset         = 0x050000,
-+              .size           = 0x2b0000,
-+      },
-+      {
-+              .name           = "uImage",
-+              .offset         = 0x300000,
-+              .size           = 0x0e0000,
-+      },
-+      {
-+              .name           = "NVRAM",
-+              .offset         = 0x3e0000,
-+              .size           = 0x010000,
-+      },
-+      {
-+              .name           = "ART",
-+              .offset         = 0x3f0000,
-+              .size           = 0x010000,
-+              .mask_flags     = MTD_WRITEABLE,
-+      },
-+};
-+
-+static struct flash_platform_data ap121_flash_data;
  
  static struct gpio_led ap121_leds_gpio[] __initdata = {
        {
-@@ -58,41 +137,84 @@ static struct gpio_keys_button ap121_gpi
+@@ -58,41 +67,78 @@ static struct gpio_keys_button ap121_gpi
        }
  };
  
  };
  
 -static struct spi_board_info ap121_spi_info[] = {
--      {
++static struct gpio_keys_button ap121_mini_gpio_keys[] __initdata = {
+       {
 -              .bus_num        = 0,
 -              .chip_select    = 0,
 -              .max_speed_hz   = 25000000,
 -              .modalias       = "mx25l1606e",
 -              .controller_data = &ap121_spi0_data,
-+static struct gpio_keys_button ap121_mini_gpio_keys[] __initdata = {
-+      {
 +              .desc           = "jumpstart button",
 +              .type           = EV_KEY,
 +              .code           = KEY_WPS_BUTTON,
 +{
 +      u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
 +
-+      ath79_register_m25p80(&ap121_flash_data);
++      ath79_register_m25p80(NULL);
 +      ath79_register_wmac(art + AP121_CALDATA_OFFSET,
 +                          art + AP121_WMAC_MAC_OFFSET);
 +
  static void __init ap121_setup(void)
  {
 -      u8 *cal_data = (u8 *) KSEG1ADDR(AP121_CAL_DATA_ADDR);
-+      ap121_flash_data.parts = ap121_parts;
-+      ap121_flash_data.nr_parts = ARRAY_SIZE(ap121_parts);
-+
 +      ap121_common_setup();
  
        ath79_register_leds_gpio(-1, ARRAY_SIZE(ap121_leds_gpio),
 +
 +static void __init ap121_mini_setup(void)
 +{
-+      ap121_flash_data.parts = ap121_mini_parts;
-+      ap121_flash_data.nr_parts = ARRAY_SIZE(ap121_mini_parts);
-+
 +      ap121_common_setup();
 +
 +      ath79_register_leds_gpio(-1, ARRAY_SIZE(ap121_mini_leds_gpio),
index 4f9d00bc1d5021d373d2336d7deaef31d5fdd6b2..a758dc095064c90db3b68f0c579a917ce3b611a9 100644 (file)
@@ -9,12 +9,9 @@
   *
   * All rights reserved.
   *
-@@ -37,17 +37,28 @@
-  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+@@ -38,16 +38,25 @@
   */
  
-+#include <linux/mtd/mtd.h>
-+#include <linux/mtd/partitions.h>
  #include <linux/pci.h>
 +#include <linux/phy.h>
 +#include <linux/platform_device.h>
@@ -40,7 +37,7 @@
  #define DB120_GPIO_LED_WLAN_5G                12
  #define DB120_GPIO_LED_WLAN_2G                13
  #define DB120_GPIO_LED_STATUS         14
-@@ -58,8 +69,50 @@
+@@ -58,8 +67,10 @@
  #define DB120_KEYS_POLL_INTERVAL      20      /* msecs */
  #define DB120_KEYS_DEBOUNCE_INTERVAL  (3 * DB120_KEYS_POLL_INTERVAL)
  
 +#define DB120_MAC1_OFFSET             6
 +#define DB120_WMAC_CALDATA_OFFSET     0x1000
 +#define DB120_PCIE_CALDATA_OFFSET     0x5000
-+
-+static struct mtd_partition db120_partitions[] = {
-+      {
-+              .name           = "u-boot",
-+              .offset         = 0,
-+              .size           = 0x040000,
-+              .mask_flags     = MTD_WRITEABLE,
-+      },
-+      {
-+              .name           = "u-boot-env",
-+              .offset         = 0x040000,
-+              .size           = 0x010000,
-+      },
-+      {
-+              .name           = "rootfs",
-+              .offset         = 0x050000,
-+              .size           = 0x630000,
-+      },
-+      {
-+              .name           = "uImage",
-+              .offset         = 0x680000,
-+              .size           = 0x160000,
-+      },
-+      {
-+              .name           = "NVRAM",
-+              .offset         = 0x7E0000,
-+              .size           = 0x010000,
-+      },
-+      {
-+              .name           = "ART",
-+              .offset         = 0x7F0000,
-+              .size           = 0x010000,
-+              .mask_flags     = MTD_WRITEABLE,
-+      }
-+};
-+
-+static struct flash_platform_data db120_flash_data = {
-+      .parts          = db120_partitions,
-+      .nr_parts       = ARRAY_SIZE(db120_partitions),
-+};
  
  static struct gpio_led db120_leds_gpio[] __initdata = {
        {
-@@ -82,6 +135,11 @@ static struct gpio_led db120_leds_gpio[]
+@@ -82,6 +93,11 @@ static struct gpio_led db120_leds_gpio[]
                .gpio           = DB120_GPIO_LED_WLAN_2G,
                .active_low     = 1,
        },
  };
  
  static struct gpio_keys_button db120_gpio_keys[] __initdata = {
-@@ -95,66 +153,89 @@ static struct gpio_keys_button db120_gpi
+@@ -95,66 +111,89 @@ static struct gpio_keys_button db120_gpi
        },
  };
  
        u8 *art = (u8 *) KSEG1ADDR(0x1fff0000);
  
 +      ath79_gpio_output_select(DB120_GPIO_LED_USB, AR934X_GPIO_OUT_GPIO);
-+      ath79_register_m25p80(&db120_flash_data);
++      ath79_register_m25p80(NULL);
 +
        ath79_register_leds_gpio(-1, ARRAY_SIZE(db120_leds_gpio),
                                 db120_leds_gpio);