Skip to content

Commit 723e9db

Browse files
committed
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: (134 commits) powerpc/nvram: Enable use Generic NVRAM driver for different size chips powerpc/iseries: Fix oops reading from /proc/iSeries/mf/*/cmdline powerpc/ps3: Workaround for flash memory I/O error powerpc/booke: Don't set DABR on 64-bit BookE, use DAC1 instead powerpc/perf_counters: Reduce stack usage of power_check_constraints powerpc: Fix bug where perf_counters breaks oprofile powerpc/85xx: Fix SMP compile error and allow NULL for smp_ops powerpc/irq: Improve nanodoc powerpc: Fix some late PowerMac G5 with PCIe ATI graphics powerpc/fsl-booke: Use HW PTE format if CONFIG_PTE_64BIT powerpc/book3e: Add missing page sizes powerpc/pseries: Fix to handle slb resize across migration powerpc/powermac: Thermal control turns system off too eagerly powerpc/pci: Merge ppc32 and ppc64 versions of phb_scan() powerpc/405ex: support cuImage via included dtb powerpc/405ex: provide necessary fixup function to support cuImage powerpc/40x: Add support for the ESTeem 195E (PPC405EP) SBC powerpc/44x: Add Eiger AMCC (AppliedMicro) PPC460SX evaluation board support. powerpc/44x: Update Arches defconfig powerpc/44x: Update Arches dts ... Fix up conflicts in drivers/char/agp/uninorth-agp.c
2 parents ada3fa1 + d331d83 commit 723e9db

File tree

220 files changed

+11256
-2461
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

220 files changed

+11256
-2461
lines changed

arch/powerpc/Kconfig

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ config PPC
123123
select HAVE_KRETPROBES
124124
select HAVE_ARCH_TRACEHOOK
125125
select HAVE_LMB
126-
select HAVE_DMA_ATTRS if PPC64
126+
select HAVE_DMA_ATTRS
127+
select HAVE_DMA_API_DEBUG
127128
select USE_GENERIC_SMP_HELPERS if SMP
128129
select HAVE_OPROFILE
129130
select HAVE_SYSCALL_WRAPPERS if PPC64
@@ -310,10 +311,6 @@ config SWIOTLB
310311
platforms where the size of a physical address is larger
311312
than the bus address. Not all platforms support this.
312313

313-
config PPC_NEED_DMA_SYNC_OPS
314-
def_bool y
315-
depends on (NOT_COHERENT_CACHE || SWIOTLB)
316-
317314
config HOTPLUG_CPU
318315
bool "Support for enabling/disabling CPUs"
319316
depends on SMP && HOTPLUG && EXPERIMENTAL && (PPC_PSERIES || PPC_PMAC)
@@ -475,7 +472,7 @@ config PPC_16K_PAGES
475472
bool "16k page size" if 44x
476473

477474
config PPC_64K_PAGES
478-
bool "64k page size" if 44x || PPC_STD_MMU_64
475+
bool "64k page size" if 44x || PPC_STD_MMU_64 || PPC_BOOK3E_64
479476
select PPC_HAS_HASH_64K if PPC_STD_MMU_64
480477

481478
config PPC_256K_PAGES
@@ -495,16 +492,16 @@ endchoice
495492

496493
config FORCE_MAX_ZONEORDER
497494
int "Maximum zone order"
498-
range 9 64 if PPC_STD_MMU_64 && PPC_64K_PAGES
499-
default "9" if PPC_STD_MMU_64 && PPC_64K_PAGES
500-
range 13 64 if PPC_STD_MMU_64 && !PPC_64K_PAGES
501-
default "13" if PPC_STD_MMU_64 && !PPC_64K_PAGES
502-
range 9 64 if PPC_STD_MMU_32 && PPC_16K_PAGES
503-
default "9" if PPC_STD_MMU_32 && PPC_16K_PAGES
504-
range 7 64 if PPC_STD_MMU_32 && PPC_64K_PAGES
505-
default "7" if PPC_STD_MMU_32 && PPC_64K_PAGES
506-
range 5 64 if PPC_STD_MMU_32 && PPC_256K_PAGES
507-
default "5" if PPC_STD_MMU_32 && PPC_256K_PAGES
495+
range 9 64 if PPC64 && PPC_64K_PAGES
496+
default "9" if PPC64 && PPC_64K_PAGES
497+
range 13 64 if PPC64 && !PPC_64K_PAGES
498+
default "13" if PPC64 && !PPC_64K_PAGES
499+
range 9 64 if PPC32 && PPC_16K_PAGES
500+
default "9" if PPC32 && PPC_16K_PAGES
501+
range 7 64 if PPC32 && PPC_64K_PAGES
502+
default "7" if PPC32 && PPC_64K_PAGES
503+
range 5 64 if PPC32 && PPC_256K_PAGES
504+
default "5" if PPC32 && PPC_256K_PAGES
508505
range 11 64
509506
default "11"
510507
help

arch/powerpc/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ CPP = $(CC) -E $(KBUILD_CFLAGS)
7777
CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)__
7878

7979
ifeq ($(CONFIG_PPC64),y)
80-
GCC_BROKEN_VEC := $(shell if [ $(call cc-version) -lt 0400 ] ; then echo "y"; fi)
80+
GCC_BROKEN_VEC := $(call cc-ifversion, -lt, 0400, y)
8181

8282
ifeq ($(CONFIG_POWER4_ONLY),y)
8383
ifeq ($(CONFIG_ALTIVEC),y)

arch/powerpc/boot/4xx.c

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
* Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
99
* Copyright (c) 2003, 2004 Zultys Technologies
1010
*
11+
* Copyright (C) 2009 Wind River Systems, Inc.
12+
* Updated for supporting PPC405EX on Kilauea.
13+
* Tiejun Chen <tiejun.chen@windriver.com>
14+
*
1115
* This program is free software; you can redistribute it and/or
1216
* modify it under the terms of the GNU General Public License
1317
* as published by the Free Software Foundation; either version
@@ -659,3 +663,141 @@ void ibm405ep_fixup_clocks(unsigned int sys_clk)
659663
dt_fixup_clock("/plb/opb/serial@ef600300", uart0);
660664
dt_fixup_clock("/plb/opb/serial@ef600400", uart1);
661665
}
666+
667+
static u8 ibm405ex_fwdv_multi_bits[] = {
668+
/* values for: 1 - 16 */
669+
0x01, 0x02, 0x0e, 0x09, 0x04, 0x0b, 0x10, 0x0d, 0x0c, 0x05,
670+
0x06, 0x0f, 0x0a, 0x07, 0x08, 0x03
671+
};
672+
673+
u32 ibm405ex_get_fwdva(unsigned long cpr_fwdv)
674+
{
675+
u32 index;
676+
677+
for (index = 0; index < ARRAY_SIZE(ibm405ex_fwdv_multi_bits); index++)
678+
if (cpr_fwdv == (u32)ibm405ex_fwdv_multi_bits[index])
679+
return index + 1;
680+
681+
return 0;
682+
}
683+
684+
static u8 ibm405ex_fbdv_multi_bits[] = {
685+
/* values for: 1 - 100 */
686+
0x00, 0xff, 0x7e, 0xfd, 0x7a, 0xf5, 0x6a, 0xd5, 0x2a, 0xd4,
687+
0x29, 0xd3, 0x26, 0xcc, 0x19, 0xb3, 0x67, 0xce, 0x1d, 0xbb,
688+
0x77, 0xee, 0x5d, 0xba, 0x74, 0xe9, 0x52, 0xa5, 0x4b, 0x96,
689+
0x2c, 0xd8, 0x31, 0xe3, 0x46, 0x8d, 0x1b, 0xb7, 0x6f, 0xde,
690+
0x3d, 0xfb, 0x76, 0xed, 0x5a, 0xb5, 0x6b, 0xd6, 0x2d, 0xdb,
691+
0x36, 0xec, 0x59, 0xb2, 0x64, 0xc9, 0x12, 0xa4, 0x48, 0x91,
692+
0x23, 0xc7, 0x0e, 0x9c, 0x38, 0xf0, 0x61, 0xc2, 0x05, 0x8b,
693+
0x17, 0xaf, 0x5f, 0xbe, 0x7c, 0xf9, 0x72, 0xe5, 0x4a, 0x95,
694+
0x2b, 0xd7, 0x2e, 0xdc, 0x39, 0xf3, 0x66, 0xcd, 0x1a, 0xb4,
695+
0x68, 0xd1, 0x22, 0xc4, 0x09, 0x93, 0x27, 0xcf, 0x1e, 0xbc,
696+
/* values for: 101 - 200 */
697+
0x78, 0xf1, 0x62, 0xc5, 0x0a, 0x94, 0x28, 0xd0, 0x21, 0xc3,
698+
0x06, 0x8c, 0x18, 0xb0, 0x60, 0xc1, 0x02, 0x84, 0x08, 0x90,
699+
0x20, 0xc0, 0x01, 0x83, 0x07, 0x8f, 0x1f, 0xbf, 0x7f, 0xfe,
700+
0x7d, 0xfa, 0x75, 0xea, 0x55, 0xaa, 0x54, 0xa9, 0x53, 0xa6,
701+
0x4c, 0x99, 0x33, 0xe7, 0x4e, 0x9d, 0x3b, 0xf7, 0x6e, 0xdd,
702+
0x3a, 0xf4, 0x69, 0xd2, 0x25, 0xcb, 0x16, 0xac, 0x58, 0xb1,
703+
0x63, 0xc6, 0x0d, 0x9b, 0x37, 0xef, 0x5e, 0xbd, 0x7b, 0xf6,
704+
0x6d, 0xda, 0x35, 0xeb, 0x56, 0xad, 0x5b, 0xb6, 0x6c, 0xd9,
705+
0x32, 0xe4, 0x49, 0x92, 0x24, 0xc8, 0x11, 0xa3, 0x47, 0x8e,
706+
0x1c, 0xb8, 0x70, 0xe1, 0x42, 0x85, 0x0b, 0x97, 0x2f, 0xdf,
707+
/* values for: 201 - 255 */
708+
0x3e, 0xfc, 0x79, 0xf2, 0x65, 0xca, 0x15, 0xab, 0x57, 0xae,
709+
0x5c, 0xb9, 0x73, 0xe6, 0x4d, 0x9a, 0x34, 0xe8, 0x51, 0xa2,
710+
0x44, 0x89, 0x13, 0xa7, 0x4f, 0x9e, 0x3c, 0xf8, 0x71, 0xe2,
711+
0x45, 0x8a, 0x14, 0xa8, 0x50, 0xa1, 0x43, 0x86, 0x0c, 0x98,
712+
0x30, 0xe0, 0x41, 0x82, 0x04, 0x88, 0x10, 0xa0, 0x40, 0x81,
713+
0x03, 0x87, 0x0f, 0x9f, 0x3f /* END */
714+
};
715+
716+
u32 ibm405ex_get_fbdv(unsigned long cpr_fbdv)
717+
{
718+
u32 index;
719+
720+
for (index = 0; index < ARRAY_SIZE(ibm405ex_fbdv_multi_bits); index++)
721+
if (cpr_fbdv == (u32)ibm405ex_fbdv_multi_bits[index])
722+
return index + 1;
723+
724+
return 0;
725+
}
726+
727+
void ibm405ex_fixup_clocks(unsigned int sys_clk, unsigned int uart_clk)
728+
{
729+
/* PLL config */
730+
u32 pllc = CPR0_READ(DCRN_CPR0_PLLC);
731+
u32 plld = CPR0_READ(DCRN_CPR0_PLLD);
732+
u32 cpud = CPR0_READ(DCRN_CPR0_PRIMAD);
733+
u32 plbd = CPR0_READ(DCRN_CPR0_PRIMBD);
734+
u32 opbd = CPR0_READ(DCRN_CPR0_OPBD);
735+
u32 perd = CPR0_READ(DCRN_CPR0_PERD);
736+
737+
/* Dividers */
738+
u32 fbdv = ibm405ex_get_fbdv(__fix_zero((plld >> 24) & 0xff, 1));
739+
740+
u32 fwdva = ibm405ex_get_fwdva(__fix_zero((plld >> 16) & 0x0f, 1));
741+
742+
u32 cpudv0 = __fix_zero((cpud >> 24) & 7, 8);
743+
744+
/* PLBDV0 is hardwared to 010. */
745+
u32 plbdv0 = 2;
746+
u32 plb2xdv0 = __fix_zero((plbd >> 16) & 7, 8);
747+
748+
u32 opbdv0 = __fix_zero((opbd >> 24) & 3, 4);
749+
750+
u32 perdv0 = __fix_zero((perd >> 24) & 3, 4);
751+
752+
/* Resulting clocks */
753+
u32 cpu, plb, opb, ebc, vco, tb, uart0, uart1;
754+
755+
/* PLL's VCO is the source for primary forward ? */
756+
if (pllc & 0x40000000) {
757+
u32 m;
758+
759+
/* Feedback path */
760+
switch ((pllc >> 24) & 7) {
761+
case 0:
762+
/* PLLOUTx */
763+
m = fbdv;
764+
break;
765+
case 1:
766+
/* CPU */
767+
m = fbdv * fwdva * cpudv0;
768+
break;
769+
case 5:
770+
/* PERClk */
771+
m = fbdv * fwdva * plb2xdv0 * plbdv0 * opbdv0 * perdv0;
772+
break;
773+
default:
774+
printf("WARNING ! Invalid PLL feedback source !\n");
775+
goto bypass;
776+
}
777+
778+
vco = (unsigned int)(sys_clk * m);
779+
} else {
780+
bypass:
781+
/* Bypass system PLL */
782+
vco = 0;
783+
}
784+
785+
/* CPU = VCO / ( FWDVA x CPUDV0) */
786+
cpu = vco / (fwdva * cpudv0);
787+
/* PLB = VCO / ( FWDVA x PLB2XDV0 x PLBDV0) */
788+
plb = vco / (fwdva * plb2xdv0 * plbdv0);
789+
/* OPB = PLB / OPBDV0 */
790+
opb = plb / opbdv0;
791+
/* EBC = OPB / PERDV0 */
792+
ebc = opb / perdv0;
793+
794+
tb = cpu;
795+
uart0 = uart1 = uart_clk;
796+
797+
dt_fixup_cpu_clocks(cpu, tb, 0);
798+
dt_fixup_clock("/plb", plb);
799+
dt_fixup_clock("/plb/opb", opb);
800+
dt_fixup_clock("/plb/opb/ebc", ebc);
801+
dt_fixup_clock("/plb/opb/serial@ef600200", uart0);
802+
dt_fixup_clock("/plb/opb/serial@ef600300", uart1);
803+
}

arch/powerpc/boot/4xx.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ void ibm4xx_fixup_ebc_ranges(const char *ebc);
2121

2222
void ibm405gp_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk);
2323
void ibm405ep_fixup_clocks(unsigned int sys_clk);
24+
void ibm405ex_fixup_clocks(unsigned int sys_clk, unsigned int uart_clk);
2425
void ibm440gp_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk);
2526
void ibm440ep_fixup_clocks(unsigned int sys_clk, unsigned int ser_clk,
2627
unsigned int tmr_clk);

arch/powerpc/boot/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ DTS_FLAGS ?= -p 1024
3939

4040
$(obj)/4xx.o: BOOTCFLAGS += -mcpu=405
4141
$(obj)/ebony.o: BOOTCFLAGS += -mcpu=405
42+
$(obj)/cuboot-hotfoot.o: BOOTCFLAGS += -mcpu=405
4243
$(obj)/cuboot-taishan.o: BOOTCFLAGS += -mcpu=405
4344
$(obj)/cuboot-katmai.o: BOOTCFLAGS += -mcpu=405
4445
$(obj)/cuboot-acadia.o: BOOTCFLAGS += -mcpu=405
@@ -67,15 +68,15 @@ src-wlib := string.S crt0.S crtsavres.S stdio.c main.c \
6768
cpm-serial.c stdlib.c mpc52xx-psc.c planetcore.c uartlite.c \
6869
fsl-soc.c mpc8xx.c pq2.c
6970
src-plat := of.c cuboot-52xx.c cuboot-824x.c cuboot-83xx.c cuboot-85xx.c holly.c \
70-
cuboot-ebony.c treeboot-ebony.c prpmc2800.c \
71+
cuboot-ebony.c cuboot-hotfoot.c treeboot-ebony.c prpmc2800.c \
7172
ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c cuboot-8xx.c \
7273
cuboot-pq2.c cuboot-sequoia.c treeboot-walnut.c \
7374
cuboot-bamboo.c cuboot-mpc7448hpc2.c cuboot-taishan.c \
7475
fixed-head.S ep88xc.c ep405.c cuboot-c2k.c \
7576
cuboot-katmai.c cuboot-rainier.c redboot-8xx.c ep8248e.c \
7677
cuboot-warp.c cuboot-85xx-cpm2.c cuboot-yosemite.c simpleboot.c \
7778
virtex405-head.S virtex.c redboot-83xx.c cuboot-sam440ep.c \
78-
cuboot-acadia.c cuboot-amigaone.c
79+
cuboot-acadia.c cuboot-amigaone.c cuboot-kilauea.c
7980
src-boot := $(src-wlib) $(src-plat) empty.c
8081

8182
src-boot := $(addprefix $(obj)/, $(src-boot))
@@ -190,6 +191,7 @@ image-$(CONFIG_DEFAULT_UIMAGE) += uImage
190191

191192
# Board ports in arch/powerpc/platform/40x/Kconfig
192193
image-$(CONFIG_EP405) += dtbImage.ep405
194+
image-$(CONFIG_HOTFOOT) += cuImage.hotfoot
193195
image-$(CONFIG_WALNUT) += treeImage.walnut
194196
image-$(CONFIG_ACADIA) += cuImage.acadia
195197

0 commit comments

Comments
 (0)