Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e505240b authored by Andrew Victor's avatar Andrew Victor Committed by Russell King
Browse files

[ARM] 5257/2: [AT91] Use SZ_ definitions and MTDPART_OFS_NXTBLK instead of hex-values



In the various AT91 board files, replace hard-coded size values (eg,
0x800000) with the SZ_ size definitions (eg, SZ_8M) from sizes.h
Also replace MTD partition offsets with MTDPART_OFS_NXTBLK.

Signed-off-by: default avatarAndrew Victor <linux@maxim.org.za>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent a745a622
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -214,7 +214,7 @@ static struct physmap_flash_data cap9adk_nor_data = {
};
};


#define NOR_BASE	AT91_CHIPSELECT_0
#define NOR_BASE	AT91_CHIPSELECT_0
#define NOR_SIZE	0x800000
#define NOR_SIZE	SZ_8M


static struct resource nor_flash_resources[] = {
static struct resource nor_flash_resources[] = {
	{
	{
+2 −2
Original line number Original line Diff line number Diff line
@@ -28,7 +28,6 @@
#include <linux/input.h>
#include <linux/input.h>
#include <linux/gpio_keys.h>
#include <linux/gpio_keys.h>


#include <mach/hardware.h>
#include <asm/setup.h>
#include <asm/setup.h>
#include <asm/mach-types.h>
#include <asm/mach-types.h>
#include <asm/irq.h>
#include <asm/irq.h>
@@ -37,6 +36,7 @@
#include <asm/mach/map.h>
#include <asm/mach/map.h>
#include <asm/mach/irq.h>
#include <asm/mach/irq.h>


#include <mach/hardware.h>
#include <mach/board.h>
#include <mach/board.h>
#include <mach/gpio.h>
#include <mach/gpio.h>


@@ -114,7 +114,7 @@ static struct spi_board_info csb337_spi_devices[] = {
};
};


#define CSB_FLASH_BASE	AT91_CHIPSELECT_0
#define CSB_FLASH_BASE	AT91_CHIPSELECT_0
#define CSB_FLASH_SIZE	0x800000
#define CSB_FLASH_SIZE	SZ_8M


static struct mtd_partition csb_flash_partitions[] = {
static struct mtd_partition csb_flash_partitions[] = {
	{
	{
+2 −2
Original line number Original line Diff line number Diff line
@@ -25,7 +25,6 @@
#include <linux/platform_device.h>
#include <linux/platform_device.h>
#include <linux/mtd/physmap.h>
#include <linux/mtd/physmap.h>


#include <mach/hardware.h>
#include <asm/setup.h>
#include <asm/setup.h>
#include <asm/mach-types.h>
#include <asm/mach-types.h>
#include <asm/irq.h>
#include <asm/irq.h>
@@ -34,6 +33,7 @@
#include <asm/mach/map.h>
#include <asm/mach/map.h>
#include <asm/mach/irq.h>
#include <asm/mach/irq.h>


#include <mach/hardware.h>
#include <mach/board.h>
#include <mach/board.h>
#include <mach/gpio.h>
#include <mach/gpio.h>


@@ -72,7 +72,7 @@ static struct at91_udc_data __initdata csb637_udc_data = {
};
};


#define CSB_FLASH_BASE	AT91_CHIPSELECT_0
#define CSB_FLASH_BASE	AT91_CHIPSELECT_0
#define CSB_FLASH_SIZE	0x1000000
#define CSB_FLASH_SIZE	SZ_16M


static struct mtd_partition csb_flash_partitions[] = {
static struct mtd_partition csb_flash_partitions[] = {
	{
	{
+2 −2
Original line number Original line Diff line number Diff line
@@ -29,7 +29,6 @@
#include <linux/spi/spi.h>
#include <linux/spi/spi.h>
#include <linux/mtd/physmap.h>
#include <linux/mtd/physmap.h>


#include <mach/hardware.h>
#include <asm/setup.h>
#include <asm/setup.h>
#include <asm/mach-types.h>
#include <asm/mach-types.h>
#include <asm/irq.h>
#include <asm/irq.h>
@@ -38,6 +37,7 @@
#include <asm/mach/map.h>
#include <asm/mach/map.h>
#include <asm/mach/irq.h>
#include <asm/mach/irq.h>


#include <mach/hardware.h>
#include <mach/board.h>
#include <mach/board.h>
#include <mach/gpio.h>
#include <mach/gpio.h>
#include <mach/at91rm9200_mc.h>
#include <mach/at91rm9200_mc.h>
@@ -157,7 +157,7 @@ static struct atmel_nand_data __initdata dk_nand_data = {
};
};


#define DK_FLASH_BASE	AT91_CHIPSELECT_0
#define DK_FLASH_BASE	AT91_CHIPSELECT_0
#define DK_FLASH_SIZE	0x200000
#define DK_FLASH_SIZE	SZ_2M


static struct physmap_flash_data dk_flash_data = {
static struct physmap_flash_data dk_flash_data = {
	.width		= 2,
	.width		= 2,
+2 −2
Original line number Original line Diff line number Diff line
@@ -29,7 +29,6 @@
#include <linux/spi/spi.h>
#include <linux/spi/spi.h>
#include <linux/mtd/physmap.h>
#include <linux/mtd/physmap.h>


#include <mach/hardware.h>
#include <asm/setup.h>
#include <asm/setup.h>
#include <asm/mach-types.h>
#include <asm/mach-types.h>
#include <asm/irq.h>
#include <asm/irq.h>
@@ -38,6 +37,7 @@
#include <asm/mach/map.h>
#include <asm/mach/map.h>
#include <asm/mach/irq.h>
#include <asm/mach/irq.h>


#include <mach/hardware.h>
#include <mach/board.h>
#include <mach/board.h>
#include <mach/gpio.h>
#include <mach/gpio.h>
#include <mach/at91rm9200_mc.h>
#include <mach/at91rm9200_mc.h>
@@ -116,7 +116,7 @@ static struct i2c_board_info __initdata ek_i2c_devices[] = {
};
};


#define EK_FLASH_BASE	AT91_CHIPSELECT_0
#define EK_FLASH_BASE	AT91_CHIPSELECT_0
#define EK_FLASH_SIZE	0x200000
#define EK_FLASH_SIZE	SZ_2M


static struct physmap_flash_data ek_flash_data = {
static struct physmap_flash_data ek_flash_data = {
	.width		= 2,
	.width		= 2,
Loading