Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (72 commits) powerpc/pseries: Fix build of topology stuff without CONFIG_NUMA powerpc/pseries: Fix VPHN build errors on non-SMP systems powerpc/83xx: add mpc8308_p1m DMA controller device-tree node powerpc/83xx: add DMA controller to mpc8308 device-tree node powerpc/512x: try to free dma descriptors in case of allocation failure powerpc/512x: add MPC8308 dma support powerpc/512x: fix the hanged dma transfer issue powerpc/512x: scatter/gather dma fix powerpc/powermac: Make auto-loading of therm_pm72 possible of/address: Use propper endianess in get_flags powerpc/pci: Use printf extension %pR for struct resource powerpc: Remove unnecessary casts of void ptr powerpc: Disable VPHN polling during a suspend operation powerpc/pseries: Poll VPA for topology changes and update NUMA maps powerpc: iommu: Add device name to iommu error printks powerpc: Record vma->phys_addr in ioremap() powerpc: Update compat_arch_ptrace powerpc: Fix PPC_PTRACE_SETHWDEBUG on PPC_BOOK3S powerpc/time: printk time stamp init not correct powerpc: Minor cleanups for machdep.h ...
This commit is contained in:
commit
5a62f99544
88 changed files with 2071 additions and 712 deletions
|
|
@ -403,6 +403,10 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||
bttv.pll= See Documentation/video4linux/bttv/Insmod-options
|
||||
bttv.tuner= and Documentation/video4linux/bttv/CARDLIST
|
||||
|
||||
bulk_remove=off [PPC] This parameter disables the use of the pSeries
|
||||
firmware feature for flushing multiple hpte entries
|
||||
at a time.
|
||||
|
||||
c101= [NET] Moxa C101 synchronous serial card
|
||||
|
||||
cachesize= [BUGS=X86-32] Override level 2 CPU cache size detection.
|
||||
|
|
@ -1490,6 +1494,10 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||
mtdparts= [MTD]
|
||||
See drivers/mtd/cmdlinepart.c.
|
||||
|
||||
multitce=off [PPC] This parameter disables the use of the pSeries
|
||||
firmware feature for updating multiple TCE entries
|
||||
at a time.
|
||||
|
||||
onenand.bdry= [HW,MTD] Flex-OneNAND Boundary Configuration
|
||||
|
||||
Format: [die0_boundary][,die0_lock][,die1_boundary][,die1_lock]
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ order to avoid the degeneration that had become the ppc32 kernel entry
|
|||
point and the way a new platform should be added to the kernel. The
|
||||
legacy iSeries platform breaks those rules as it predates this scheme,
|
||||
but no new board support will be accepted in the main tree that
|
||||
doesn't follows them properly. In addition, since the advent of the
|
||||
doesn't follow them properly. In addition, since the advent of the
|
||||
arch/powerpc merged architecture for ppc32 and ppc64, new 32-bit
|
||||
platforms and 32-bit platforms which move into arch/powerpc will be
|
||||
required to use these rules as well.
|
||||
|
|
@ -1025,7 +1025,7 @@ dtc source code can be found at
|
|||
|
||||
WARNING: This version is still in early development stage; the
|
||||
resulting device-tree "blobs" have not yet been validated with the
|
||||
kernel. The current generated bloc lacks a useful reserve map (it will
|
||||
kernel. The current generated block lacks a useful reserve map (it will
|
||||
be fixed to generate an empty one, it's up to the bootloader to fill
|
||||
it up) among others. The error handling needs work, bugs are lurking,
|
||||
etc...
|
||||
|
|
|
|||
52
Documentation/powerpc/dts-bindings/4xx/cpm.txt
Normal file
52
Documentation/powerpc/dts-bindings/4xx/cpm.txt
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
PPC4xx Clock Power Management (CPM) node
|
||||
|
||||
Required properties:
|
||||
- compatible : compatible list, currently only "ibm,cpm"
|
||||
- dcr-access-method : "native"
|
||||
- dcr-reg : < DCR register range >
|
||||
|
||||
Optional properties:
|
||||
- er-offset : All 4xx SoCs with a CPM controller have
|
||||
one of two different order for the CPM
|
||||
registers. Some have the CPM registers
|
||||
in the following order (ER,FR,SR). The
|
||||
others have them in the following order
|
||||
(SR,ER,FR). For the second case set
|
||||
er-offset = <1>.
|
||||
- unused-units : specifier consist of one cell. For each
|
||||
bit in the cell, the corresponding bit
|
||||
in CPM will be set to turn off unused
|
||||
devices.
|
||||
- idle-doze : specifier consist of one cell. For each
|
||||
bit in the cell, the corresponding bit
|
||||
in CPM will be set to turn off unused
|
||||
devices. This is usually just CPM[CPU].
|
||||
- standby : specifier consist of one cell. For each
|
||||
bit in the cell, the corresponding bit
|
||||
in CPM will be set on standby and
|
||||
restored on resume.
|
||||
- suspend : specifier consist of one cell. For each
|
||||
bit in the cell, the corresponding bit
|
||||
in CPM will be set on suspend (mem) and
|
||||
restored on resume. Note, for standby
|
||||
and suspend the corresponding bits can
|
||||
be different or the same. Usually for
|
||||
standby only class 2 and 3 units are set.
|
||||
However, the interface does not care.
|
||||
If they are the same, the additional
|
||||
power saving will be seeing if support
|
||||
is available to put the DDR in self
|
||||
refresh mode and any additional power
|
||||
saving techniques for the specific SoC.
|
||||
|
||||
Example:
|
||||
CPM0: cpm {
|
||||
compatible = "ibm,cpm";
|
||||
dcr-access-method = "native";
|
||||
dcr-reg = <0x160 0x003>;
|
||||
er-offset = <0>;
|
||||
unused-units = <0x00000100>;
|
||||
idle-doze = <0x02000000>;
|
||||
standby = <0xfeff0000>;
|
||||
suspend = <0xfeff791d>;
|
||||
};
|
||||
|
|
@ -20,6 +20,9 @@ config WORD_SIZE
|
|||
config ARCH_PHYS_ADDR_T_64BIT
|
||||
def_bool PPC64 || PHYS_64BIT
|
||||
|
||||
config ARCH_DMA_ADDR_T_64BIT
|
||||
def_bool ARCH_PHYS_ADDR_T_64BIT
|
||||
|
||||
config MMU
|
||||
bool
|
||||
default y
|
||||
|
|
@ -209,7 +212,7 @@ config ARCH_HIBERNATION_POSSIBLE
|
|||
config ARCH_SUSPEND_POSSIBLE
|
||||
def_bool y
|
||||
depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200 || PPC_83xx || \
|
||||
PPC_85xx || PPC_86xx || PPC_PSERIES
|
||||
PPC_85xx || PPC_86xx || PPC_PSERIES || 44x || 40x
|
||||
|
||||
config PPC_DCR_NATIVE
|
||||
bool
|
||||
|
|
@ -595,13 +598,11 @@ config EXTRA_TARGETS
|
|||
|
||||
If unsure, leave blank
|
||||
|
||||
if !44x || BROKEN
|
||||
config ARCH_WANTS_FREEZER_CONTROL
|
||||
def_bool y
|
||||
depends on ADB_PMU
|
||||
|
||||
source kernel/power/Kconfig
|
||||
endif
|
||||
|
||||
config SECCOMP
|
||||
bool "Enable seccomp to safely compute untrusted bytecode"
|
||||
|
|
@ -682,6 +683,15 @@ config FSL_PMC
|
|||
Freescale MPC85xx/MPC86xx power management controller support
|
||||
(suspend/resume). For MPC83xx see platforms/83xx/suspend.c
|
||||
|
||||
config PPC4xx_CPM
|
||||
bool
|
||||
default y
|
||||
depends on SUSPEND && (44x || 40x)
|
||||
help
|
||||
PPC4xx Clock Power Management (CPM) support (suspend/resume).
|
||||
It also enables support for two different idle states (idle-wait
|
||||
and idle-doze).
|
||||
|
||||
config 4xx_SOC
|
||||
bool
|
||||
|
||||
|
|
|
|||
|
|
@ -105,6 +105,15 @@
|
|||
dcr-reg = <0x00c 0x002>;
|
||||
};
|
||||
|
||||
CPM0: cpm {
|
||||
compatible = "ibm,cpm";
|
||||
dcr-access-method = "native";
|
||||
dcr-reg = <0x160 0x003>;
|
||||
unused-units = <0x00000100>;
|
||||
idle-doze = <0x02000000>;
|
||||
standby = <0xfeff791d>;
|
||||
};
|
||||
|
||||
L2C0: l2c {
|
||||
compatible = "ibm,l2-cache-460ex", "ibm,l2-cache";
|
||||
dcr-reg = <0x020 0x008 /* Internal SRAM DCR's */
|
||||
|
|
@ -270,28 +279,6 @@
|
|||
interrupts = <0x1 0x4>;
|
||||
};
|
||||
|
||||
UART2: serial@ef600500 {
|
||||
device_type = "serial";
|
||||
compatible = "ns16550";
|
||||
reg = <0xef600500 0x00000008>;
|
||||
virtual-reg = <0xef600500>;
|
||||
clock-frequency = <0>; /* Filled in by U-Boot */
|
||||
current-speed = <0>; /* Filled in by U-Boot */
|
||||
interrupt-parent = <&UIC1>;
|
||||
interrupts = <28 0x4>;
|
||||
};
|
||||
|
||||
UART3: serial@ef600600 {
|
||||
device_type = "serial";
|
||||
compatible = "ns16550";
|
||||
reg = <0xef600600 0x00000008>;
|
||||
virtual-reg = <0xef600600>;
|
||||
clock-frequency = <0>; /* Filled in by U-Boot */
|
||||
current-speed = <0>; /* Filled in by U-Boot */
|
||||
interrupt-parent = <&UIC1>;
|
||||
interrupts = <29 0x4>;
|
||||
};
|
||||
|
||||
IIC0: i2c@ef600700 {
|
||||
compatible = "ibm,iic-460ex", "ibm,iic";
|
||||
reg = <0xef600700 0x00000014>;
|
||||
|
|
|
|||
|
|
@ -82,6 +82,15 @@
|
|||
interrupt-parent = <&UIC0>;
|
||||
};
|
||||
|
||||
CPM0: cpm {
|
||||
compatible = "ibm,cpm";
|
||||
dcr-access-method = "native";
|
||||
dcr-reg = <0x0b0 0x003>;
|
||||
unused-units = <0x00000000>;
|
||||
idle-doze = <0x02000000>;
|
||||
standby = <0xe3e74800>;
|
||||
};
|
||||
|
||||
plb {
|
||||
compatible = "ibm,plb-405ex", "ibm,plb4";
|
||||
#address-cells = <1>;
|
||||
|
|
|
|||
|
|
@ -297,6 +297,14 @@
|
|||
interrupt-parent = < &ipic >;
|
||||
};
|
||||
|
||||
dma@2c000 {
|
||||
compatible = "fsl,mpc8308-dma", "fsl,mpc5121-dma";
|
||||
reg = <0x2c000 0x1800>;
|
||||
interrupts = <3 0x8
|
||||
94 0x8>;
|
||||
interrupt-parent = < &ipic >;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
pci0: pcie@e0009000 {
|
||||
|
|
|
|||
|
|
@ -265,6 +265,14 @@
|
|||
interrupt-parent = < &ipic >;
|
||||
};
|
||||
|
||||
dma@2c000 {
|
||||
compatible = "fsl,mpc8308-dma", "fsl,mpc5121-dma";
|
||||
reg = <0x2c000 0x1800>;
|
||||
interrupts = <3 0x8
|
||||
94 0x8>;
|
||||
interrupt-parent = < &ipic >;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
pci0: pcie@e0009000 {
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ CONFIG_MODULES=y
|
|||
CONFIG_MODULE_UNLOAD=y
|
||||
# CONFIG_BLK_DEV_BSG is not set
|
||||
CONFIG_KILAUEA=y
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
# CONFIG_WALNUT is not set
|
||||
CONFIG_SPARSE_IRQ=y
|
||||
CONFIG_PCI=y
|
||||
|
|
@ -42,6 +44,9 @@ CONFIG_MTD_PHYSMAP_OF=y
|
|||
CONFIG_MTD_NAND=y
|
||||
CONFIG_MTD_NAND_NDFC=y
|
||||
CONFIG_PROC_DEVICETREE=y
|
||||
CONFIG_PM=y
|
||||
CONFIG_SUSPEND=y
|
||||
CONFIG_PPC4xx_CPM=y
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_SIZE=35000
|
||||
# CONFIG_MISC_DEVICES is not set
|
||||
|
|
|
|||
|
|
@ -42,6 +42,9 @@ CONFIG_MTD_PHYSMAP_OF=y
|
|||
CONFIG_MTD_NAND=y
|
||||
CONFIG_MTD_NAND_NDFC=y
|
||||
CONFIG_PROC_DEVICETREE=y
|
||||
CONFIG_PM=y
|
||||
CONFIG_SUSPEND=y
|
||||
CONFIG_PPC4xx_CPM=y
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_SIZE=35000
|
||||
# CONFIG_MISC_DEVICES is not set
|
||||
|
|
|
|||
|
|
@ -267,7 +267,16 @@ static __inline__ int fls64(__u64 x)
|
|||
#include <asm-generic/bitops/fls64.h>
|
||||
#endif /* __powerpc64__ */
|
||||
|
||||
#ifdef CONFIG_PPC64
|
||||
unsigned int __arch_hweight8(unsigned int w);
|
||||
unsigned int __arch_hweight16(unsigned int w);
|
||||
unsigned int __arch_hweight32(unsigned int w);
|
||||
unsigned long __arch_hweight64(__u64 w);
|
||||
#include <asm-generic/bitops/const_hweight.h>
|
||||
#else
|
||||
#include <asm-generic/bitops/hweight.h>
|
||||
#endif
|
||||
|
||||
#include <asm-generic/bitops/find.h>
|
||||
|
||||
/* Little-endian versions */
|
||||
|
|
|
|||
|
|
@ -199,6 +199,8 @@ extern const char *powerpc_base_platform;
|
|||
#define CPU_FTR_UNALIGNED_LD_STD LONG_ASM_CONST(0x0080000000000000)
|
||||
#define CPU_FTR_ASYM_SMT LONG_ASM_CONST(0x0100000000000000)
|
||||
#define CPU_FTR_STCX_CHECKS_ADDRESS LONG_ASM_CONST(0x0200000000000000)
|
||||
#define CPU_FTR_POPCNTB LONG_ASM_CONST(0x0400000000000000)
|
||||
#define CPU_FTR_POPCNTD LONG_ASM_CONST(0x0800000000000000)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
|
|
@ -403,21 +405,22 @@ extern const char *powerpc_base_platform;
|
|||
CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \
|
||||
CPU_FTR_MMCRA | CPU_FTR_SMT | \
|
||||
CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \
|
||||
CPU_FTR_PURR | CPU_FTR_STCX_CHECKS_ADDRESS)
|
||||
CPU_FTR_PURR | CPU_FTR_STCX_CHECKS_ADDRESS | \
|
||||
CPU_FTR_POPCNTB)
|
||||
#define CPU_FTRS_POWER6 (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \
|
||||
CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \
|
||||
CPU_FTR_MMCRA | CPU_FTR_SMT | \
|
||||
CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \
|
||||
CPU_FTR_PURR | CPU_FTR_SPURR | CPU_FTR_REAL_LE | \
|
||||
CPU_FTR_DSCR | CPU_FTR_UNALIGNED_LD_STD | \
|
||||
CPU_FTR_STCX_CHECKS_ADDRESS)
|
||||
CPU_FTR_STCX_CHECKS_ADDRESS | CPU_FTR_POPCNTB)
|
||||
#define CPU_FTRS_POWER7 (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \
|
||||
CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \
|
||||
CPU_FTR_MMCRA | CPU_FTR_SMT | \
|
||||
CPU_FTR_COHERENT_ICACHE | CPU_FTR_LOCKLESS_TLBIE | \
|
||||
CPU_FTR_PURR | CPU_FTR_SPURR | CPU_FTR_REAL_LE | \
|
||||
CPU_FTR_DSCR | CPU_FTR_SAO | CPU_FTR_ASYM_SMT | \
|
||||
CPU_FTR_STCX_CHECKS_ADDRESS)
|
||||
CPU_FTR_STCX_CHECKS_ADDRESS | CPU_FTR_POPCNTB | CPU_FTR_POPCNTD)
|
||||
#define CPU_FTRS_CELL (CPU_FTR_USE_TB | CPU_FTR_LWSYNC | \
|
||||
CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_CTRL | \
|
||||
CPU_FTR_ALTIVEC_COMP | CPU_FTR_MMCRA | CPU_FTR_SMT | \
|
||||
|
|
|
|||
|
|
@ -61,22 +61,25 @@ static inline cpumask_t cpu_online_cores_map(void)
|
|||
return cpu_thread_mask_to_cores(cpu_online_map);
|
||||
}
|
||||
|
||||
static inline int cpu_thread_to_core(int cpu)
|
||||
{
|
||||
return cpu >> threads_shift;
|
||||
}
|
||||
#ifdef CONFIG_SMP
|
||||
int cpu_core_index_of_thread(int cpu);
|
||||
int cpu_first_thread_of_core(int core);
|
||||
#else
|
||||
static inline int cpu_core_index_of_thread(int cpu) { return cpu; }
|
||||
static inline int cpu_first_thread_of_core(int core) { return core; }
|
||||
#endif
|
||||
|
||||
static inline int cpu_thread_in_core(int cpu)
|
||||
{
|
||||
return cpu & (threads_per_core - 1);
|
||||
}
|
||||
|
||||
static inline int cpu_first_thread_in_core(int cpu)
|
||||
static inline int cpu_first_thread_sibling(int cpu)
|
||||
{
|
||||
return cpu & ~(threads_per_core - 1);
|
||||
}
|
||||
|
||||
static inline int cpu_last_thread_in_core(int cpu)
|
||||
static inline int cpu_last_thread_sibling(int cpu)
|
||||
{
|
||||
return cpu | (threads_per_core - 1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,12 @@
|
|||
struct dma_map_ops;
|
||||
struct device_node;
|
||||
|
||||
/*
|
||||
* Arch extensions to struct device.
|
||||
*
|
||||
* When adding fields, consider macio_add_one_device in
|
||||
* drivers/macintosh/macio_asic.c
|
||||
*/
|
||||
struct dev_archdata {
|
||||
/* DMA operations on that device */
|
||||
struct dma_map_ops *dma_ops;
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@
|
|||
#define FW_FEATURE_PS3_LV1 ASM_CONST(0x0000000000800000)
|
||||
#define FW_FEATURE_BEAT ASM_CONST(0x0000000001000000)
|
||||
#define FW_FEATURE_CMO ASM_CONST(0x0000000002000000)
|
||||
#define FW_FEATURE_VPHN ASM_CONST(0x0000000004000000)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
|
|
@ -59,7 +60,7 @@ enum {
|
|||
FW_FEATURE_VIO | FW_FEATURE_RDMA | FW_FEATURE_LLAN |
|
||||
FW_FEATURE_BULK_REMOVE | FW_FEATURE_XDABR |
|
||||
FW_FEATURE_MULTITCE | FW_FEATURE_SPLPAR | FW_FEATURE_LPAR |
|
||||
FW_FEATURE_CMO,
|
||||
FW_FEATURE_CMO | FW_FEATURE_VPHN,
|
||||
FW_FEATURE_PSERIES_ALWAYS = 0,
|
||||
FW_FEATURE_ISERIES_POSSIBLE = FW_FEATURE_ISERIES | FW_FEATURE_LPAR,
|
||||
FW_FEATURE_ISERIES_ALWAYS = FW_FEATURE_ISERIES | FW_FEATURE_LPAR,
|
||||
|
|
|
|||
|
|
@ -232,7 +232,9 @@
|
|||
#define H_GET_EM_PARMS 0x2B8
|
||||
#define H_SET_MPP 0x2D0
|
||||
#define H_GET_MPP 0x2D4
|
||||
#define MAX_HCALL_OPCODE H_GET_MPP
|
||||
#define H_HOME_NODE_ASSOCIATIVITY 0x2EC
|
||||
#define H_BEST_ENERGY 0x2F4
|
||||
#define MAX_HCALL_OPCODE H_BEST_ENERGY
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
|
|
|
|||
|
|
@ -62,7 +62,10 @@ struct lppaca {
|
|||
volatile u32 dyn_pir; // Dynamic ProcIdReg value x20-x23
|
||||
u32 dsei_data; // DSEI data x24-x27
|
||||
u64 sprg3; // SPRG3 value x28-x2F
|
||||
u8 reserved3[80]; // Reserved x30-x7F
|
||||
u8 reserved3[40]; // Reserved x30-x57
|
||||
volatile u8 vphn_assoc_counts[8]; // Virtual processor home node
|
||||
// associativity change counters x58-x5F
|
||||
u8 reserved4[32]; // Reserved x60-x7F
|
||||
|
||||
//=============================================================================
|
||||
// CACHE_LINE_2 0x0080 - 0x00FF Contains local read-write data
|
||||
|
|
|
|||
|
|
@ -27,9 +27,7 @@ struct iommu_table;
|
|||
struct rtc_time;
|
||||
struct file;
|
||||
struct pci_controller;
|
||||
#ifdef CONFIG_KEXEC
|
||||
struct kimage;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
struct smp_ops_t {
|
||||
|
|
@ -72,7 +70,7 @@ struct machdep_calls {
|
|||
int psize, int ssize);
|
||||
void (*flush_hash_range)(unsigned long number, int local);
|
||||
|
||||
/* special for kexec, to be called in real mode, linar mapping is
|
||||
/* special for kexec, to be called in real mode, linear mapping is
|
||||
* destroyed as well */
|
||||
void (*hpte_clear_all)(void);
|
||||
|
||||
|
|
@ -324,8 +322,6 @@ extern sys_ctrler_t sys_ctrler;
|
|||
|
||||
#endif /* CONFIG_PPC_PMAC */
|
||||
|
||||
extern void setup_pci_ptrs(void);
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
/* Poor default implementations */
|
||||
extern void __devinit smp_generic_give_timebase(void);
|
||||
|
|
|
|||
|
|
@ -33,6 +33,9 @@ extern int numa_cpu_lookup_table[];
|
|||
extern cpumask_var_t node_to_cpumask_map[];
|
||||
#ifdef CONFIG_MEMORY_HOTPLUG
|
||||
extern unsigned long max_pfn;
|
||||
u64 memory_hotplug_max(void);
|
||||
#else
|
||||
#define memory_hotplug_max() memblock_end_of_DRAM()
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
@ -42,6 +45,8 @@ extern unsigned long max_pfn;
|
|||
#define node_start_pfn(nid) (NODE_DATA(nid)->node_start_pfn)
|
||||
#define node_end_pfn(nid) (NODE_DATA(nid)->node_end_pfn)
|
||||
|
||||
#else
|
||||
#define memory_hotplug_max() memblock_end_of_DRAM()
|
||||
#endif /* CONFIG_NEED_MULTIPLE_NODES */
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
|
|
|||
|
|
@ -10,31 +10,7 @@
|
|||
#ifndef _ASM_POWERPC_NVRAM_H
|
||||
#define _ASM_POWERPC_NVRAM_H
|
||||
|
||||
#include <linux/errno.h>
|
||||
|
||||
#define NVRW_CNT 0x20
|
||||
#define NVRAM_HEADER_LEN 16 /* sizeof(struct nvram_header) */
|
||||
#define NVRAM_BLOCK_LEN 16
|
||||
#define NVRAM_MAX_REQ (2080/NVRAM_BLOCK_LEN)
|
||||
#define NVRAM_MIN_REQ (1056/NVRAM_BLOCK_LEN)
|
||||
|
||||
#define NVRAM_AS0 0x74
|
||||
#define NVRAM_AS1 0x75
|
||||
#define NVRAM_DATA 0x77
|
||||
|
||||
|
||||
/* RTC Offsets */
|
||||
|
||||
#define MOTO_RTC_SECONDS 0x1FF9
|
||||
#define MOTO_RTC_MINUTES 0x1FFA
|
||||
#define MOTO_RTC_HOURS 0x1FFB
|
||||
#define MOTO_RTC_DAY_OF_WEEK 0x1FFC
|
||||
#define MOTO_RTC_DAY_OF_MONTH 0x1FFD
|
||||
#define MOTO_RTC_MONTH 0x1FFE
|
||||
#define MOTO_RTC_YEAR 0x1FFF
|
||||
#define MOTO_RTC_CONTROLA 0x1FF8
|
||||
#define MOTO_RTC_CONTROLB 0x1FF9
|
||||
|
||||
/* Signatures for nvram partitions */
|
||||
#define NVRAM_SIG_SP 0x02 /* support processor */
|
||||
#define NVRAM_SIG_OF 0x50 /* open firmware config */
|
||||
#define NVRAM_SIG_FW 0x51 /* general firmware */
|
||||
|
|
@ -49,32 +25,19 @@
|
|||
#define NVRAM_SIG_OS 0xa0 /* OS defined */
|
||||
#define NVRAM_SIG_PANIC 0xa1 /* Apple OSX "panic" */
|
||||
|
||||
/* If change this size, then change the size of NVNAME_LEN */
|
||||
struct nvram_header {
|
||||
unsigned char signature;
|
||||
unsigned char checksum;
|
||||
unsigned short length;
|
||||
char name[12];
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include <linux/errno.h>
|
||||
#include <linux/list.h>
|
||||
|
||||
struct nvram_partition {
|
||||
struct list_head partition;
|
||||
struct nvram_header header;
|
||||
unsigned int index;
|
||||
};
|
||||
|
||||
|
||||
#ifdef CONFIG_PPC_PSERIES
|
||||
extern int nvram_write_error_log(char * buff, int length,
|
||||
unsigned int err_type, unsigned int err_seq);
|
||||
extern int nvram_read_error_log(char * buff, int length,
|
||||
unsigned int * err_type, unsigned int *err_seq);
|
||||
extern int nvram_clear_error_log(void);
|
||||
|
||||
extern int pSeries_nvram_init(void);
|
||||
#endif /* CONFIG_PPC_PSERIES */
|
||||
|
||||
#ifdef CONFIG_MMIO_NVRAM
|
||||
extern int mmio_nvram_init(void);
|
||||
|
|
@ -85,6 +48,13 @@ static inline int mmio_nvram_init(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
extern int __init nvram_scan_partitions(void);
|
||||
extern loff_t nvram_create_partition(const char *name, int sig,
|
||||
int req_size, int min_size);
|
||||
extern int nvram_remove_partition(const char *name, int sig);
|
||||
extern int nvram_get_partition_size(loff_t data_index);
|
||||
extern loff_t nvram_find_partition(const char *name, int sig, int *out_size);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
/* PowerMac specific nvram stuffs */
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue