mirror of https://github.com/hak5/openwrt-owl.git
ar71xx: remove the built-in MTD map of the AP96 board
Pass the mtd_layout via the kernel command line instead. SVN-Revision: 31112owl
parent
61ee283899
commit
6cd5fb7001
|
@ -11,8 +11,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/mtd/mtd.h>
|
|
||||||
#include <linux/mtd/partitions.h>
|
|
||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
|
|
||||||
#include <asm/mach-ath79/ath79.h>
|
#include <asm/mach-ath79/ath79.h>
|
||||||
|
@ -45,38 +43,6 @@
|
||||||
#define AP96_CALDATA0_OFFSET 0x1000
|
#define AP96_CALDATA0_OFFSET 0x1000
|
||||||
#define AP96_CALDATA1_OFFSET 0x5000
|
#define AP96_CALDATA1_OFFSET 0x5000
|
||||||
|
|
||||||
static struct mtd_partition ap96_partitions[] = {
|
|
||||||
{
|
|
||||||
.name = "uboot",
|
|
||||||
.offset = 0,
|
|
||||||
.size = 0x030000,
|
|
||||||
.mask_flags = MTD_WRITEABLE,
|
|
||||||
}, {
|
|
||||||
.name = "env",
|
|
||||||
.offset = 0x030000,
|
|
||||||
.size = 0x010000,
|
|
||||||
.mask_flags = MTD_WRITEABLE,
|
|
||||||
}, {
|
|
||||||
.name = "rootfs",
|
|
||||||
.offset = 0x040000,
|
|
||||||
.size = 0x600000,
|
|
||||||
}, {
|
|
||||||
.name = "uImage",
|
|
||||||
.offset = 0x640000,
|
|
||||||
.size = 0x1b0000,
|
|
||||||
}, {
|
|
||||||
.name = "caldata",
|
|
||||||
.offset = 0x7f0000,
|
|
||||||
.size = 0x010000,
|
|
||||||
.mask_flags = MTD_WRITEABLE,
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct flash_platform_data ap96_flash_data = {
|
|
||||||
.parts = ap96_partitions,
|
|
||||||
.nr_parts = ARRAY_SIZE(ap96_partitions),
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* AP96 has 12 unlabeled leds in the front; these are numbered from 1 to 12
|
* AP96 has 12 unlabeled leds in the front; these are numbered from 1 to 12
|
||||||
* below (from left to right on the board). Led 1 seems to be on whenever the
|
* below (from left to right on the board). Led 1 seems to be on whenever the
|
||||||
|
@ -158,7 +124,7 @@ static void __init ap96_setup(void)
|
||||||
|
|
||||||
ath79_register_usb();
|
ath79_register_usb();
|
||||||
|
|
||||||
ath79_register_m25p80(&ap96_flash_data);
|
ath79_register_m25p80(NULL);
|
||||||
|
|
||||||
ath79_register_leds_gpio(-1, ARRAY_SIZE(ap96_leds_gpio),
|
ath79_register_leds_gpio(-1, ARRAY_SIZE(ap96_leds_gpio),
|
||||||
ap96_leds_gpio);
|
ap96_leds_gpio);
|
||||||
|
|
|
@ -658,6 +658,7 @@ define Image/Build/Profile/AP83
|
||||||
endef
|
endef
|
||||||
|
|
||||||
ap96_cmdline=board=AP96 console=ttyS0,115200
|
ap96_cmdline=board=AP96 console=ttyS0,115200
|
||||||
|
ap96_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(u-boot-env)ro,6144k(rootfs),1728k(kernel),64k(art)ro,7872k@0x40000(firmware)
|
||||||
define Image/Build/Profile/AP96
|
define Image/Build/Profile/AP96
|
||||||
$(call Image/Build/Template/$(fs_64k)/$(1),AthGzip,ap96,$(ap96_cmdline),ap96_mtdlayout,1769472,6291456,RKuImage)
|
$(call Image/Build/Template/$(fs_64k)/$(1),AthGzip,ap96,$(ap96_cmdline),ap96_mtdlayout,1769472,6291456,RKuImage)
|
||||||
endef
|
endef
|
||||||
|
|
Loading…
Reference in New Issue