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

TOMOYO Linux Cross Reference
Linux/arch/sh/boards/mach-sdk7780/setup.c

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ 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  * arch/sh/boards/renesas/sdk7780/setup.c
  4  *
  5  * Renesas Solutions SH7780 SDK Support
  6  * Copyright (C) 2008 Nicholas Beck <nbeck@mpc-data.co.uk>
  7  */
  8 #include <linux/init.h>
  9 #include <linux/types.h>
 10 #include <linux/platform_device.h>
 11 #include <linux/ata_platform.h>
 12 #include <asm/machvec.h>
 13 #include <mach/sdk7780.h>
 14 #include <asm/heartbeat.h>
 15 #include <asm/io.h>
 16 #include <asm/addrspace.h>
 17 
 18 #define GPIO_PECR        0xFFEA0008
 19 
 20 /* Heartbeat */
 21 static struct resource heartbeat_resource = {
 22         .start  = PA_LED,
 23         .end    = PA_LED,
 24         .flags  = IORESOURCE_MEM | IORESOURCE_MEM_16BIT,
 25 };
 26 
 27 static struct platform_device heartbeat_device = {
 28         .name           = "heartbeat",
 29         .id             = -1,
 30         .num_resources  = 1,
 31         .resource       = &heartbeat_resource,
 32 };
 33 
 34 /* SMC91x */
 35 static struct resource smc91x_eth_resources[] = {
 36         [0] = {
 37                 .name   = "smc91x-regs" ,
 38                 .start  = PA_LAN + 0x300,
 39                 .end    = PA_LAN + 0x300 + 0x10 ,
 40                 .flags  = IORESOURCE_MEM,
 41         },
 42         [1] = {
 43                 .start  = IRQ_ETHERNET,
 44                 .end    = IRQ_ETHERNET,
 45                 .flags  = IORESOURCE_IRQ,
 46         },
 47 };
 48 
 49 static struct platform_device smc91x_eth_device = {
 50         .name           = "smc91x",
 51         .id             = 0,
 52         .dev = {
 53                 .dma_mask               = NULL,         /* don't use dma */
 54                 .coherent_dma_mask      = 0xffffffff,
 55         },
 56         .num_resources  = ARRAY_SIZE(smc91x_eth_resources),
 57         .resource       = smc91x_eth_resources,
 58 };
 59 
 60 static struct platform_device *sdk7780_devices[] __initdata = {
 61         &heartbeat_device,
 62         &smc91x_eth_device,
 63 };
 64 
 65 static int __init sdk7780_devices_setup(void)
 66 {
 67         return platform_add_devices(sdk7780_devices,
 68                 ARRAY_SIZE(sdk7780_devices));
 69 }
 70 device_initcall(sdk7780_devices_setup);
 71 
 72 static void __init sdk7780_setup(char **cmdline_p)
 73 {
 74         u16 ver = __raw_readw(FPGA_FPVERR);
 75         u16 dateStamp = __raw_readw(FPGA_FPDATER);
 76 
 77         printk(KERN_INFO "Renesas Technology Europe SDK7780 support.\n");
 78         printk(KERN_INFO "Board version: %d (revision %d), "
 79                          "FPGA version: %d (revision %d), datestamp : %d\n",
 80                          (ver >> 12) & 0xf, (ver >> 8) & 0xf,
 81                          (ver >>  4) & 0xf, ver & 0xf,
 82                          dateStamp);
 83 
 84         /* Setup pin mux'ing for PCIC */
 85         __raw_writew(0x0000, GPIO_PECR);
 86 }
 87 
 88 /*
 89  * The Machine Vector
 90  */
 91 static struct sh_machine_vector mv_se7780 __initmv = {
 92         .mv_name        = "Renesas SDK7780-R3" ,
 93         .mv_setup               = sdk7780_setup,
 94         .mv_init_irq    = init_sdk7780_IRQ,
 95 };
 96 
 97 

~ [ 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