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

TOMOYO Linux Cross Reference
Linux/arch/arm/mach-orion5x/board-dt.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-only
  2 /*
  3  * Copyright 2012 (C), Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  4  *
  5  * arch/arm/mach-orion5x/board-dt.c
  6  *
  7  * Flattened Device Tree board initialization
  8  */
  9 
 10 #include <linux/kernel.h>
 11 #include <linux/init.h>
 12 #include <linux/of.h>
 13 #include <linux/of_platform.h>
 14 #include <linux/cpu.h>
 15 #include <linux/mbus.h>
 16 #include <linux/clocksource.h>
 17 #include <asm/system_misc.h>
 18 #include <asm/mach/arch.h>
 19 #include <asm/mach/map.h>
 20 #include <plat/irq.h>
 21 #include <plat/time.h>
 22 #include "orion5x.h"
 23 #include "bridge-regs.h"
 24 #include "common.h"
 25 
 26 static struct of_dev_auxdata orion5x_auxdata_lookup[] __initdata = {
 27         OF_DEV_AUXDATA("marvell,orion-spi", 0xf1010600, "orion_spi.0", NULL),
 28         OF_DEV_AUXDATA("marvell,mv64xxx-i2c", 0xf1011000, "mv64xxx_i2c.0",
 29                        NULL),
 30         OF_DEV_AUXDATA("marvell,orion-wdt", 0xf1020300, "orion_wdt", NULL),
 31         OF_DEV_AUXDATA("marvell,orion-sata", 0xf1080000, "sata_mv.0", NULL),
 32         OF_DEV_AUXDATA("marvell,orion-crypto", 0xf1090000, "mv_crypto", NULL),
 33         {},
 34 };
 35 
 36 static void __init orion5x_dt_init(void)
 37 {
 38         char *dev_name;
 39         u32 dev, rev;
 40 
 41         orion5x_id(&dev, &rev, &dev_name);
 42         printk(KERN_INFO "Orion ID: %s. TCLK=%d.\n", dev_name, orion5x_tclk);
 43 
 44         BUG_ON(mvebu_mbus_dt_init(false));
 45 
 46         /*
 47          * Setup Orion address map
 48          */
 49         orion5x_setup_wins();
 50 
 51         /*
 52          * Don't issue "Wait for Interrupt" instruction if we are
 53          * running on D0 5281 silicon.
 54          */
 55         if (dev == MV88F5281_DEV_ID && rev == MV88F5281_REV_D0) {
 56                 printk(KERN_INFO "Orion: Applying 5281 D0 WFI workaround.\n");
 57                 cpu_idle_poll_ctrl(true);
 58         }
 59 
 60         if (of_machine_is_compatible("maxtor,shared-storage-2"))
 61                 mss2_init();
 62 
 63         if (of_machine_is_compatible("lacie,d2-network"))
 64                 d2net_init();
 65 
 66         of_platform_default_populate(NULL, orion5x_auxdata_lookup, NULL);
 67 }
 68 
 69 static const char *orion5x_dt_compat[] = {
 70         "marvell,orion5x",
 71         NULL,
 72 };
 73 
 74 DT_MACHINE_START(ORION5X_DT, "Marvell Orion5x (Flattened Device Tree)")
 75         /* Maintainer: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> */
 76         .map_io         = orion5x_map_io,
 77         .init_machine   = orion5x_dt_init,
 78         .restart        = orion5x_restart,
 79         .dt_compat      = orion5x_dt_compat,
 80 MACHINE_END
 81 

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