collie.c (5a2dd72abdae75ea2960145e0549635ce4e0be96) | collie.c (224be092d116b663ac426c4615e34ee54bab4a14) |
---|---|
1/* 2 * linux/arch/arm/mach-sa1100/collie.c 3 * 4 * May be copied or modified under the terms of the GNU General Public 5 * License. See linux/COPYING for more information. 6 * 7 * This file contains all Collie-specific tweaks. 8 * --- 11 unchanged lines hidden (view full) --- 20#include <linux/init.h> 21#include <linux/kernel.h> 22#include <linux/tty.h> 23#include <linux/delay.h> 24#include <linux/platform_device.h> 25#include <linux/mtd/mtd.h> 26#include <linux/mtd/partitions.h> 27#include <linux/timer.h> | 1/* 2 * linux/arch/arm/mach-sa1100/collie.c 3 * 4 * May be copied or modified under the terms of the GNU General Public 5 * License. See linux/COPYING for more information. 6 * 7 * This file contains all Collie-specific tweaks. 8 * --- 11 unchanged lines hidden (view full) --- 20#include <linux/init.h> 21#include <linux/kernel.h> 22#include <linux/tty.h> 23#include <linux/delay.h> 24#include <linux/platform_device.h> 25#include <linux/mtd/mtd.h> 26#include <linux/mtd/partitions.h> 27#include <linux/timer.h> |
28#include <linux/gpio.h> |
|
28 29#include <mach/hardware.h> 30#include <asm/mach-types.h> 31#include <asm/irq.h> 32#include <asm/setup.h> 33#include <mach/collie.h> 34 35#include <asm/mach/arch.h> --- 154 unchanged lines hidden (view full) --- 190 .size = 0x00100000, 191 }, { 192 .name = "rootfs", 193 .offset = MTDPART_OFS_APPEND, 194 .size = 0x00e20000, 195 } 196}; 197 | 29 30#include <mach/hardware.h> 31#include <asm/mach-types.h> 32#include <asm/irq.h> 33#include <asm/setup.h> 34#include <mach/collie.h> 35 36#include <asm/mach/arch.h> --- 154 unchanged lines hidden (view full) --- 191 .size = 0x00100000, 192 }, { 193 .name = "rootfs", 194 .offset = MTDPART_OFS_APPEND, 195 .size = 0x00e20000, 196 } 197}; 198 |
199static int collie_flash_init(void) 200{ 201 int rc; 202 rc = gpio_request(COLLIE_GPIO_VPEN, "flash Vpp enable"); 203 if (rc) 204 return rc; 205 206 rc = gpio_direction_output(COLLIE_GPIO_VPEN, 1); 207 if (rc) 208 gpio_free(COLLIE_GPIO_VPEN); 209 210 return rc; 211} 212 |
|
198static void collie_set_vpp(int vpp) 199{ | 213static void collie_set_vpp(int vpp) 214{ |
200 write_scoop_reg(&colliescoop_device.dev, SCOOP_GPCR, read_scoop_reg(&colliescoop_device.dev, SCOOP_GPCR) | COLLIE_SCP_VPEN); 201 if (vpp) 202 write_scoop_reg(&colliescoop_device.dev, SCOOP_GPWR, read_scoop_reg(&colliescoop_device.dev, SCOOP_GPWR) | COLLIE_SCP_VPEN); 203 else 204 write_scoop_reg(&colliescoop_device.dev, SCOOP_GPWR, read_scoop_reg(&colliescoop_device.dev, SCOOP_GPWR) & ~COLLIE_SCP_VPEN); | 215 gpio_set_value(COLLIE_GPIO_VPEN, vpp); |
205} 206 | 216} 217 |
218static void collie_flash_exit(void) 219{ 220 gpio_free(COLLIE_GPIO_VPEN); 221} |
|
207static struct flash_platform_data collie_flash_data = { 208 .map_name = "cfi_probe", | 222static struct flash_platform_data collie_flash_data = { 223 .map_name = "cfi_probe", |
224 .init = collie_flash_init, |
|
209 .set_vpp = collie_set_vpp, | 225 .set_vpp = collie_set_vpp, |
226 .exit = collie_flash_exit, |
|
210 .parts = collie_partitions, 211 .nr_parts = ARRAY_SIZE(collie_partitions), 212}; 213 214static struct resource collie_flash_resources[] = { 215 { 216 .start = SA1100_CS0_PHYS, 217 .end = SA1100_CS0_PHYS + SZ_32M - 1, --- 80 unchanged lines hidden --- | 227 .parts = collie_partitions, 228 .nr_parts = ARRAY_SIZE(collie_partitions), 229}; 230 231static struct resource collie_flash_resources[] = { 232 { 233 .start = SA1100_CS0_PHYS, 234 .end = SA1100_CS0_PHYS + SZ_32M - 1, --- 80 unchanged lines hidden --- |