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

TOMOYO Linux Cross Reference
Linux/arch/sh/boards/mach-se/7780/setup.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  * linux/arch/sh/boards/se/7780/setup.c
  4  *
  5  * Copyright (C) 2006,2007  Nobuhiro Iwamatsu
  6  *
  7  * Hitachi UL SolutionEngine 7780 Support.
  8  */
  9 #include <linux/init.h>
 10 #include <linux/platform_device.h>
 11 #include <asm/machvec.h>
 12 #include <mach-se/mach/se7780.h>
 13 #include <asm/io.h>
 14 #include <asm/heartbeat.h>
 15 
 16 /* Heartbeat */
 17 static struct resource heartbeat_resource = {
 18         .start  = PA_LED,
 19         .end    = PA_LED,
 20         .flags  = IORESOURCE_MEM | IORESOURCE_MEM_16BIT,
 21 };
 22 
 23 static struct platform_device heartbeat_device = {
 24         .name           = "heartbeat",
 25         .id             = -1,
 26         .num_resources  = 1,
 27         .resource       = &heartbeat_resource,
 28 };
 29 
 30 /* SMC91x */
 31 static struct resource smc91x_eth_resources[] = {
 32         [0] = {
 33                 .name   = "smc91x-regs" ,
 34                 .start  = PA_LAN + 0x300,
 35                 .end    = PA_LAN + 0x300 + 0x10 ,
 36                 .flags  = IORESOURCE_MEM,
 37         },
 38         [1] = {
 39                 .start  = SMC_IRQ,
 40                 .end    = SMC_IRQ,
 41                 .flags  = IORESOURCE_IRQ,
 42         },
 43 };
 44 
 45 static struct platform_device smc91x_eth_device = {
 46         .name           = "smc91x",
 47         .id             = 0,
 48         .dev = {
 49                 .dma_mask               = NULL,         /* don't use dma */
 50                 .coherent_dma_mask      = 0xffffffff,
 51         },
 52         .num_resources  = ARRAY_SIZE(smc91x_eth_resources),
 53         .resource       = smc91x_eth_resources,
 54 };
 55 
 56 static struct platform_device *se7780_devices[] __initdata = {
 57         &heartbeat_device,
 58         &smc91x_eth_device,
 59 };
 60 
 61 static int __init se7780_devices_setup(void)
 62 {
 63         return platform_add_devices(se7780_devices,
 64                 ARRAY_SIZE(se7780_devices));
 65 }
 66 device_initcall(se7780_devices_setup);
 67 
 68 #define GPIO_PHCR        0xFFEA000E
 69 #define GPIO_PMSELR      0xFFEA0080
 70 #define GPIO_PECR        0xFFEA0008
 71 
 72 static void __init se7780_setup(char **cmdline_p)
 73 {
 74         /* "SH-Linux" on LED Display */
 75         __raw_writew( 'S' , PA_LED_DISP + (DISP_SEL0_ADDR << 1) );
 76         __raw_writew( 'H' , PA_LED_DISP + (DISP_SEL1_ADDR << 1) );
 77         __raw_writew( '-' , PA_LED_DISP + (DISP_SEL2_ADDR << 1) );
 78         __raw_writew( 'L' , PA_LED_DISP + (DISP_SEL3_ADDR << 1) );
 79         __raw_writew( 'i' , PA_LED_DISP + (DISP_SEL4_ADDR << 1) );
 80         __raw_writew( 'n' , PA_LED_DISP + (DISP_SEL5_ADDR << 1) );
 81         __raw_writew( 'u' , PA_LED_DISP + (DISP_SEL6_ADDR << 1) );
 82         __raw_writew( 'x' , PA_LED_DISP + (DISP_SEL7_ADDR << 1) );
 83 
 84         printk(KERN_INFO "Hitachi UL Solutions Engine 7780SE03 support.\n");
 85 
 86         /*
 87          * PCI REQ/GNT setting
 88          *   REQ0/GNT0 -> USB
 89          *   REQ1/GNT1 -> PC Card
 90          *   REQ2/GNT2 -> Serial ATA
 91          *   REQ3/GNT3 -> PCI slot
 92          */
 93         __raw_writew(0x0213, FPGA_REQSEL);
 94 
 95         /* GPIO setting */
 96         __raw_writew(0x0000, GPIO_PECR);
 97         __raw_writew(__raw_readw(GPIO_PHCR)&0xfff3, GPIO_PHCR);
 98         __raw_writew(0x0c00, GPIO_PMSELR);
 99 
100         /* iVDR Power ON */
101         __raw_writew(0x0001, FPGA_IVDRPW);
102 }
103 
104 /*
105  * The Machine Vector
106  */
107 static struct sh_machine_vector mv_se7780 __initmv = {
108         .mv_name                = "Solution Engine 7780" ,
109         .mv_setup               = se7780_setup ,
110         .mv_init_irq            = init_se7780_IRQ,
111 };
112 

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