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

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

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ 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.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

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

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

kernel.org | git.kernel.org | LWN.net | Project Home | 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.

sflogo.php