~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/m68k/platform/coldfire/firebee.c

Version: ~ [ linux-5.9-rc6 ] ~ [ linux-5.8.10 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.66 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.146 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.198 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.236 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.236 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /***************************************************************************/
  2 
  3 /*
  4  *      firebee.c -- extra startup code support for the FireBee boards
  5  *
  6  *      Copyright (C) 2011, Greg Ungerer (gerg@snapgear.com)
  7  */
  8 
  9 /***************************************************************************/
 10 
 11 #include <linux/kernel.h>
 12 #include <linux/init.h>
 13 #include <linux/io.h>
 14 #include <linux/platform_device.h>
 15 #include <linux/mtd/mtd.h>
 16 #include <linux/mtd/partitions.h>
 17 #include <linux/mtd/physmap.h>
 18 #include <asm/coldfire.h>
 19 #include <asm/mcfsim.h>
 20 
 21 /***************************************************************************/
 22 
 23 /*
 24  *      8MB of NOR flash fitted to the FireBee board.
 25  */
 26 #define FLASH_PHYS_ADDR         0xe0000000      /* Physical address of flash */
 27 #define FLASH_PHYS_SIZE         0x00800000      /* Size of flash */
 28 
 29 #define PART_BOOT_START         0x00000000      /* Start at bottom of flash */
 30 #define PART_BOOT_SIZE          0x00040000      /* 256k in size */
 31 #define PART_IMAGE_START        0x00040000      /* Start after boot loader */
 32 #define PART_IMAGE_SIZE         0x006c0000      /* Most of flash */
 33 #define PART_FPGA_START         0x00700000      /* Start at offset 7MB */
 34 #define PART_FPGA_SIZE          0x00100000      /* 1MB in size */
 35 
 36 static struct mtd_partition firebee_flash_parts[] = {
 37         {
 38                 .name   = "dBUG",
 39                 .offset = PART_BOOT_START,
 40                 .size   = PART_BOOT_SIZE,
 41         },
 42         {
 43                 .name   = "FPGA",
 44                 .offset = PART_FPGA_START,
 45                 .size   = PART_FPGA_SIZE,
 46         },
 47         {
 48                 .name   = "image",
 49                 .offset = PART_IMAGE_START,
 50                 .size   = PART_IMAGE_SIZE,
 51         },
 52 };
 53 
 54 static struct physmap_flash_data firebee_flash_data = {
 55         .width          = 2,
 56         .nr_parts       = ARRAY_SIZE(firebee_flash_parts),
 57         .parts          = firebee_flash_parts,
 58 };
 59 
 60 static struct resource firebee_flash_resource = {
 61         .start          = FLASH_PHYS_ADDR,
 62         .end            = FLASH_PHYS_ADDR + FLASH_PHYS_SIZE,
 63         .flags          = IORESOURCE_MEM,
 64 };
 65 
 66 static struct platform_device firebee_flash = {
 67         .name           = "physmap-flash",
 68         .id             = 0,
 69         .dev            = {
 70                 .platform_data = &firebee_flash_data,
 71         },
 72         .num_resources  = 1,
 73         .resource       = &firebee_flash_resource,
 74 };
 75 
 76 /***************************************************************************/
 77 
 78 static int __init init_firebee(void)
 79 {
 80         platform_device_register(&firebee_flash);
 81         return 0;
 82 }
 83 
 84 arch_initcall(init_firebee);
 85 
 86 /***************************************************************************/
 87 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp