~ubuntu-branches/ubuntu/trusty/linux-armadaxp/trusty

« back to all changes in this revision

Viewing changes to arch/openrisc/kernel/prom.c

  • Committer: Package Import Robot
  • Author(s): Michael Casadevall, Bryan Wu, Dann Frazier, Michael Casadeall
  • Date: 2012-03-10 15:00:54 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120310150054-flugb39zon8vvgwe
Tags: 3.2.0-1600.1
[ Bryan Wu ]
* UBUNTU: import debian/debian.env and debian.armadaxp

[ Dann Frazier ]
* ARM: Armada XP: remove trailing '/' in dirnames in mvRules.mk

[ Michael Casadeall ]
* tools: add some tools for Marvell Armada XP processor
* kernel: timer tick hacking from Marvell
* kernel: Sheeva Errata: add delay on Sheeva when powering down
* net: add Marvell NFP netfilter
* net: socket and skb modifications made by Marvell
* miscdevice: add minor IDs for some Marvell Armada drivers
* fs: introduce memory pool for splice()
* video: EDID detection updates from Marvell Armada XP patchset
* video: backlight: add Marvell Dove LCD backlight driver
* video: display: add THS8200 display driver
* video: framebuffer: add Marvell Dove and Armada XP processor onchip LCD controller driver
* usbtest: add Interrupt transfer testing by Marvell Armada XP code
* usb: ehci: add support for Marvell EHCI controler
* tty/serial: 8250: add support for Marvell Armada XP processor and DeviceTree work
* rtc: add support for Marvell Armada XP onchip RTC controller
* net: pppoe: add Marvell ethernet NFP hook in PPPoE networking driver
* mtd: nand: add support for Marvell Armada XP Nand Flash Controller
* mtd: maps: add Marvell Armada XP specific map driver
* mmc: add support for Marvell Armada XP MMC/SD host controller
* i2c: add support for Marvell Armada XP onchip i2c bus controller
* hwmon: add Kconfig option for Armada XP onchip thermal sensor driver
* dmaengine: add Net DMA support for splice and update Marvell XOR DMA engine driver
* ata: add support for Marvell Armada XP SATA controller and update some quirks
* ARM: add Marvell Armada XP machine to mach-types
* ARM: oprofile: add support for Marvell PJ4B core
* ARM: mm: more ARMv6 switches for Marvell Armada XP
* ARM: remove static declaration to allow compilation
* ARM: alignment access fault trick
* ARM: mm: skip some fault fixing when run on NONE SMP ARMv6 mode during early abort event
* ARM: mm: add Marvell Sheeva CPU Architecture for PJ4B
* ARM: introduce optimized copy operation for Marvell Armada XP
* ARM: SAUCE: hardware breakpoint trick for Marvell Armada XP
* ARM: big endian and little endian tricks for Marvell Armada XP
* ARM: SAUCE: Add Marvell Armada XP build rules to arch/arm/kernel/Makefile
* ARM: vfp: add special handling for Marvell Armada XP
* ARM: add support for Marvell U-Boot
* ARM: add mv_controller_num for ARM PCI drivers
* ARM: add support for local PMUs, general SMP tweaks and cache flushing
* ARM: add Marvell device identifies in glue-proc.h
* ARM: add IPC driver support for Marvell platforms
* ARM: add DMA mapping for Marvell platforms
* ARM: add Sheeva errata and PJ4B code for booting
* ARM: update Kconfig and Makefile to include Marvell Armada XP platforms
* ARM: Armada XP: import LSP from Marvell for Armada XP 3.2 kernel enablement

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * OpenRISC prom.c
 
3
 *
 
4
 * Linux architectural port borrowing liberally from similar works of
 
5
 * others.  All original copyrights apply as per the original source
 
6
 * declaration.
 
7
 *
 
8
 * Modifications for the OpenRISC architecture:
 
9
 * Copyright (C) 2010-2011 Jonas Bonn <jonas@southpole.se>
 
10
 *
 
11
 *      This program is free software; you can redistribute it and/or
 
12
 *      modify it under the terms of the GNU General Public License
 
13
 *      as published by the Free Software Foundation; either version
 
14
 *      2 of the License, or (at your option) any later version.
 
15
 *
 
16
 * Architecture specific procedures for creating, accessing and
 
17
 * interpreting the device tree.
 
18
 *
 
19
 */
 
20
 
 
21
#include <stdarg.h>
 
22
#include <linux/kernel.h>
 
23
#include <linux/string.h>
 
24
#include <linux/init.h>
 
25
#include <linux/threads.h>
 
26
#include <linux/spinlock.h>
 
27
#include <linux/types.h>
 
28
#include <linux/pci.h>
 
29
#include <linux/stringify.h>
 
30
#include <linux/delay.h>
 
31
#include <linux/initrd.h>
 
32
#include <linux/bitops.h>
 
33
#include <linux/module.h>
 
34
#include <linux/kexec.h>
 
35
#include <linux/debugfs.h>
 
36
#include <linux/irq.h>
 
37
#include <linux/memblock.h>
 
38
#include <linux/of_fdt.h>
 
39
 
 
40
#include <asm/prom.h>
 
41
#include <asm/page.h>
 
42
#include <asm/processor.h>
 
43
#include <asm/irq.h>
 
44
#include <linux/io.h>
 
45
#include <asm/system.h>
 
46
#include <asm/mmu.h>
 
47
#include <asm/pgtable.h>
 
48
#include <asm/sections.h>
 
49
#include <asm/setup.h>
 
50
 
 
51
extern char cmd_line[COMMAND_LINE_SIZE];
 
52
 
 
53
void __init early_init_dt_add_memory_arch(u64 base, u64 size)
 
54
{
 
55
        size &= PAGE_MASK;
 
56
        memblock_add(base, size);
 
57
}
 
58
 
 
59
void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
 
60
{
 
61
        return __va(memblock_alloc(size, align));
 
62
}
 
63
 
 
64
void __init early_init_devtree(void *params)
 
65
{
 
66
        void *alloc;
 
67
 
 
68
        /* Setup flat device-tree pointer */
 
69
        initial_boot_params = params;
 
70
 
 
71
 
 
72
        /* Retrieve various informations from the /chosen node of the
 
73
         * device-tree, including the platform type, initrd location and
 
74
         * size, TCE reserve, and more ...
 
75
         */
 
76
        of_scan_flat_dt(early_init_dt_scan_chosen, cmd_line);
 
77
 
 
78
        /* Scan memory nodes and rebuild MEMBLOCKs */
 
79
        memblock_init();
 
80
        of_scan_flat_dt(early_init_dt_scan_root, NULL);
 
81
        of_scan_flat_dt(early_init_dt_scan_memory, NULL);
 
82
 
 
83
        /* Save command line for /proc/cmdline and then parse parameters */
 
84
        strlcpy(boot_command_line, cmd_line, COMMAND_LINE_SIZE);
 
85
 
 
86
        memblock_analyze();
 
87
 
 
88
        /* We must copy the flattend device tree from init memory to regular
 
89
         * memory because the device tree references the strings in it
 
90
         * directly.
 
91
         */
 
92
 
 
93
        alloc = __va(memblock_alloc(initial_boot_params->totalsize, PAGE_SIZE));
 
94
 
 
95
        memcpy(alloc, initial_boot_params, initial_boot_params->totalsize);
 
96
 
 
97
        initial_boot_params = alloc;
 
98
}
 
99
 
 
100
#ifdef CONFIG_BLK_DEV_INITRD
 
101
void __init early_init_dt_setup_initrd_arch(unsigned long start,
 
102
                unsigned long end)
 
103
{
 
104
        initrd_start = (unsigned long)__va(start);
 
105
        initrd_end = (unsigned long)__va(end);
 
106
        initrd_below_start_ok = 1;
 
107
}
 
108
#endif