Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
83153203
Commit
83153203
authored
Mar 17, 2011
by
Benjamin Herrenschmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote branch 'jwb/next' into next
parents
b0aea14b
21a06b04
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
218 additions
and
7 deletions
+218
-7
arch/powerpc/boot/dts/canyonlands.dts
arch/powerpc/boot/dts/canyonlands.dts
+24
-0
arch/powerpc/include/asm/cputable.h
arch/powerpc/include/asm/cputable.h
+2
-1
arch/powerpc/kernel/cputable.c
arch/powerpc/kernel/cputable.c
+18
-4
arch/powerpc/mm/tlb_nohash_low.S
arch/powerpc/mm/tlb_nohash_low.S
+35
-0
arch/powerpc/platforms/44x/44x.h
arch/powerpc/platforms/44x/44x.h
+4
-0
arch/powerpc/platforms/44x/Kconfig
arch/powerpc/platforms/44x/Kconfig
+0
-1
arch/powerpc/platforms/44x/Makefile
arch/powerpc/platforms/44x/Makefile
+1
-0
arch/powerpc/platforms/44x/canyonlands.c
arch/powerpc/platforms/44x/canyonlands.c
+134
-0
arch/powerpc/platforms/44x/ppc44x_simple.c
arch/powerpc/platforms/44x/ppc44x_simple.c
+0
-1
No files found.
arch/powerpc/boot/dts/canyonlands.dts
View file @
83153203
...
...
@@ -172,6 +172,19 @@ USB1: usb@bffd0000 {
interrupts
=
<
0x1e
4
>;
};
USBOTG0
:
usbotg
@
bff80000
{
compatible
=
"amcc,dwc-otg"
;
reg
=
<
0x4
0xbff80000
0x10000
>;
interrupt
-
parent
=
<&
USBOTG0
>;
#
interrupt
-
cells
=
<
1
>;
#
address
-
cells
=
<
0
>;
#
size
-
cells
=
<
0
>;
interrupts
=
<
0x0
0x1
0x2
>;
interrupt
-
map
=
</*
USB
-
OTG
*/
0x0
&
UIC2
0x1c
0x4
/*
HIGH
-
POWER
*/
0x1
&
UIC1
0x1a
0x8
/*
DMA
*/
0x2
&
UIC0
0xc
0x4
>;
};
SATA0
:
sata
@
bffd1000
{
compatible
=
"amcc,sata-460ex"
;
reg
=
<
4
0xbffd1000
0x800
4
0xbffd0800
0x400
>;
...
...
@@ -233,6 +246,11 @@ partition@3fa0000 {
};
};
cpld
@
2
,
0
{
compatible
=
"amcc,ppc460ex-bcsr"
;
reg
=
<
2
0x0
0x9
>;
};
ndfc
@
3
,
0
{
compatible
=
"ibm,ndfc"
;
reg
=
<
0x00000003
0x00000000
0x00002000
>;
...
...
@@ -307,6 +325,12 @@ IIC1: i2c@ef600800 {
interrupts
=
<
0x3
0x4
>;
};
GPIO0
:
gpio
@
ef600b00
{
compatible
=
"ibm,ppc4xx-gpio"
;
reg
=
<
0xef600b00
0x00000048
>;
gpio
-
controller
;
};
ZMII0
:
emac
-
zmii
@
ef600d00
{
compatible
=
"ibm,zmii-460ex"
,
"ibm,zmii"
;
reg
=
<
0xef600d00
0x0000000c
>;
...
...
arch/powerpc/include/asm/cputable.h
View file @
83153203
...
...
@@ -154,6 +154,7 @@ extern const char *powerpc_base_platform;
#define CPU_FTR_NAP_DISABLE_L2_PR ASM_CONST(0x0000000000002000)
#define CPU_FTR_DUAL_PLL_750FX ASM_CONST(0x0000000000004000)
#define CPU_FTR_NO_DPM ASM_CONST(0x0000000000008000)
#define CPU_FTR_476_DD2 ASM_CONST(0x0000000000010000)
#define CPU_FTR_NEED_COHERENT ASM_CONST(0x0000000000020000)
#define CPU_FTR_NO_BTIC ASM_CONST(0x0000000000040000)
#define CPU_FTR_NODSISRALIGN ASM_CONST(0x0000000000100000)
...
...
@@ -465,7 +466,7 @@ enum {
CPU_FTRS_44X
|
CPU_FTRS_440x6
|
#endif
#ifdef CONFIG_PPC_47x
CPU_FTRS_47X
|
CPU_FTRS_47X
|
CPU_FTR_476_DD2
|
#endif
#ifdef CONFIG_E200
CPU_FTRS_E200
|
...
...
arch/powerpc/kernel/cputable.c
View file @
83153203
...
...
@@ -1811,11 +1811,11 @@ static struct cpu_spec __initdata cpu_specs[] = {
.
machine_check
=
machine_check_440A
,
.
platform
=
"ppc440"
,
},
{
/* 476 core */
.
pvr_mask
=
0xffff
0000
,
.
pvr_value
=
0x11a5
000
0
,
{
/* 476
DD2
core */
.
pvr_mask
=
0xffff
ffff
,
.
pvr_value
=
0x11a5
208
0
,
.
cpu_name
=
"476"
,
.
cpu_features
=
CPU_FTRS_47X
,
.
cpu_features
=
CPU_FTRS_47X
|
CPU_FTR_476_DD2
,
.
cpu_user_features
=
COMMON_USER_BOOKE
|
PPC_FEATURE_HAS_FPU
,
.
mmu_features
=
MMU_FTR_TYPE_47x
|
...
...
@@ -1839,6 +1839,20 @@ static struct cpu_spec __initdata cpu_specs[] = {
.
machine_check
=
machine_check_47x
,
.
platform
=
"ppc470"
,
},
{
/* 476 others */
.
pvr_mask
=
0xffff0000
,
.
pvr_value
=
0x11a50000
,
.
cpu_name
=
"476"
,
.
cpu_features
=
CPU_FTRS_47X
,
.
cpu_user_features
=
COMMON_USER_BOOKE
|
PPC_FEATURE_HAS_FPU
,
.
mmu_features
=
MMU_FTR_TYPE_47x
|
MMU_FTR_USE_TLBIVAX_BCAST
|
MMU_FTR_LOCK_BCAST_INVAL
,
.
icache_bsize
=
32
,
.
dcache_bsize
=
128
,
.
machine_check
=
machine_check_47x
,
.
platform
=
"ppc470"
,
},
{
/* default match */
.
pvr_mask
=
0x00000000
,
.
pvr_value
=
0x00000000
,
...
...
arch/powerpc/mm/tlb_nohash_low.S
View file @
83153203
...
...
@@ -189,6 +189,13 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_TYPE_47x)
blr
#ifdef CONFIG_PPC_47x
/*
*
47
x
variant
of
icbt
*/
# define ICBT(CT,RA,RB) \
.
long
0x7c00002c
| ((CT) << 21) |
((
RA
)
<<
16
)
|
((
RB
)
<<
11
)
/*
*
_tlbivax_bcast
is
only
on
47
x
.
We
don
't bother doing a runtime
*
check
though
,
it
will
blow
up
soon
enough
if
we
mistakenly
try
...
...
@@ -206,7 +213,35 @@ _GLOBAL(_tlbivax_bcast)
isync
eieio
tlbsync
BEGIN_FTR_SECTION
b
1
f
END_FTR_SECTION_IFSET
(
CPU_FTR_476_DD2
)
sync
wrtee
r10
blr
/*
*
DD2
HW
could
hang
if
in
instruction
fetch
happens
before
msync
completes
.
*
Touch
enough
instruction
cache
lines
to
ensure
cache
hits
*/
1
:
mflr
r9
bl
2
f
2
:
mflr
r6
li
r7
,
32
ICBT
(0,
r6
,
r7
)
/*
touch
next
cache
line
*/
add
r6
,
r6
,
r7
ICBT
(0,
r6
,
r7
)
/*
touch
next
cache
line
*/
add
r6
,
r6
,
r7
ICBT
(0,
r6
,
r7
)
/*
touch
next
cache
line
*/
sync
nop
nop
nop
nop
nop
nop
nop
nop
mtlr
r9
wrtee
r10
blr
#endif /* CONFIG_PPC_47x */
...
...
arch/powerpc/platforms/44x/44x.h
View file @
83153203
...
...
@@ -4,4 +4,8 @@
extern
u8
as1_readb
(
volatile
u8
__iomem
*
addr
);
extern
void
as1_writeb
(
u8
data
,
volatile
u8
__iomem
*
addr
);
#define GPIO0_OSRH 0xC
#define GPIO0_TSRH 0x14
#define GPIO0_ISR1H 0x34
#endif
/* __POWERPC_PLATFORMS_44X_44X_H */
arch/powerpc/platforms/44x/Kconfig
View file @
83153203
...
...
@@ -115,7 +115,6 @@ config CANYONLANDS
bool "Canyonlands"
depends on 44x
default n
select PPC44x_SIMPLE
select 460EX
select PCI
select PPC4xx_PCI_EXPRESS
...
...
arch/powerpc/platforms/44x/Makefile
View file @
83153203
...
...
@@ -9,3 +9,4 @@ obj-$(CONFIG_WARP) += warp.o
obj-$(CONFIG_XILINX_VIRTEX_5_FXT)
+=
virtex.o
obj-$(CONFIG_XILINX_ML510)
+=
virtex_ml510.o
obj-$(CONFIG_ISS4xx)
+=
iss4xx.o
obj-$(CONFIG_CANYONLANDS)
+=
canyonlands.o
arch/powerpc/platforms/44x/canyonlands.c
0 → 100644
View file @
83153203
/*
* This contain platform specific code for APM PPC460EX based Canyonlands
* board.
*
* Copyright (c) 2010, Applied Micro Circuits Corporation
* Author: Rupjyoti Sarmah <rsarmah@apm.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <asm/pci-bridge.h>
#include <asm/ppc4xx.h>
#include <asm/udbg.h>
#include <asm/uic.h>
#include <linux/of_platform.h>
#include <linux/delay.h>
#include "44x.h"
#define BCSR_USB_EN 0x11
static
__initdata
struct
of_device_id
ppc460ex_of_bus
[]
=
{
{
.
compatible
=
"ibm,plb4"
,
},
{
.
compatible
=
"ibm,opb"
,
},
{
.
compatible
=
"ibm,ebc"
,
},
{
.
compatible
=
"simple-bus"
,
},
{},
};
static
int
__init
ppc460ex_device_probe
(
void
)
{
of_platform_bus_probe
(
NULL
,
ppc460ex_of_bus
,
NULL
);
return
0
;
}
machine_device_initcall
(
canyonlands
,
ppc460ex_device_probe
);
/* Using this code only for the Canyonlands board. */
static
int
__init
ppc460ex_probe
(
void
)
{
unsigned
long
root
=
of_get_flat_dt_root
();
if
(
of_flat_dt_is_compatible
(
root
,
"amcc,canyonlands"
))
{
ppc_pci_set_flags
(
PPC_PCI_REASSIGN_ALL_RSRC
);
return
1
;
}
return
0
;
}
/* USB PHY fixup code on Canyonlands kit. */
static
int
__init
ppc460ex_canyonlands_fixup
(
void
)
{
u8
__iomem
*
bcsr
;
void
__iomem
*
vaddr
;
struct
device_node
*
np
;
int
ret
=
0
;
np
=
of_find_compatible_node
(
NULL
,
NULL
,
"amcc,ppc460ex-bcsr"
);
if
(
!
np
)
{
printk
(
KERN_ERR
"failed did not find amcc, ppc460ex bcsr node
\n
"
);
return
-
ENODEV
;
}
bcsr
=
of_iomap
(
np
,
0
);
of_node_put
(
np
);
if
(
!
bcsr
)
{
printk
(
KERN_CRIT
"Could not remap bcsr
\n
"
);
ret
=
-
ENODEV
;
goto
err_bcsr
;
}
np
=
of_find_compatible_node
(
NULL
,
NULL
,
"ibm,ppc4xx-gpio"
);
if
(
!
np
)
{
printk
(
KERN_ERR
"failed did not find ibm,ppc4xx-gpio node
\n
"
);
return
-
ENODEV
;
}
vaddr
=
of_iomap
(
np
,
0
);
of_node_put
(
np
);
if
(
!
vaddr
)
{
printk
(
KERN_CRIT
"Could not get gpio node address
\n
"
);
ret
=
-
ENODEV
;
goto
err_gpio
;
}
/* Disable USB, through the BCSR7 bits */
setbits8
(
&
bcsr
[
7
],
BCSR_USB_EN
);
/* Wait for a while after reset */
msleep
(
100
);
/* Enable USB here */
clrbits8
(
&
bcsr
[
7
],
BCSR_USB_EN
);
/*
* Configure multiplexed gpio16 and gpio19 as alternate1 output
* source after USB reset. In this configuration gpio16 will be
* USB2HStop and gpio19 will be USB2DStop. For more details refer to
* table 34-7 of PPC460EX user manual.
*/
setbits32
((
vaddr
+
GPIO0_OSRH
),
0x42000000
);
setbits32
((
vaddr
+
GPIO0_TSRH
),
0x42000000
);
err_gpio:
iounmap
(
vaddr
);
err_bcsr:
iounmap
(
bcsr
);
return
ret
;
}
machine_device_initcall
(
canyonlands
,
ppc460ex_canyonlands_fixup
);
define_machine
(
canyonlands
)
{
.
name
=
"Canyonlands"
,
.
probe
=
ppc460ex_probe
,
.
progress
=
udbg_progress
,
.
init_IRQ
=
uic_init_tree
,
.
get_irq
=
uic_get_irq
,
.
restart
=
ppc4xx_reset_system
,
.
calibrate_decr
=
generic_calibrate_decr
,
};
arch/powerpc/platforms/44x/ppc44x_simple.c
View file @
83153203
...
...
@@ -53,7 +53,6 @@ static char *board[] __initdata = {
"amcc,arches"
,
"amcc,bamboo"
,
"amcc,bluestone"
,
"amcc,canyonlands"
,
"amcc,glacier"
,
"ibm,ebony"
,
"amcc,eiger"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment