Commit d6fb7d8f authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/davem/net-2.6

into ppc970.osdl.org:/home/torvalds/v2.6/linux
parents 57dd1436 1f003738
...@@ -1308,11 +1308,10 @@ S: USA ...@@ -1308,11 +1308,10 @@ S: USA
N: Benjamin Herrenschmidt N: Benjamin Herrenschmidt
E: benh@kernel.crashing.org E: benh@kernel.crashing.org
E: benh@mipsys.com D: Various parts of PPC/PPC64 & PowerMac
D: Various parts of PPC & PowerMac S: 312/107 Canberra Avenue
S: 122, boulevard Baille S: Griffith, ACT 2603
S: 13005 Marseille S: Australia
S: France
N: Sebastian Hetze N: Sebastian Hetze
E: she@lunetix.de E: she@lunetix.de
......
...@@ -18,24 +18,37 @@ ...@@ -18,24 +18,37 @@
#include <asm/offsets.h> #include <asm/offsets.h>
#include <asm/cache.h> #include <asm/cache.h>
_GLOBAL(__power4_cpu_preinit) _GLOBAL(__970_cpu_preinit)
/* /*
* On the PPC970, we have to turn off real-mode cache inhibit * Deal only with PPC970 and PPC970FX.
* early, before we first turn the MMU off.
*/ */
mfspr r0,SPRN_PVR mfspr r0,SPRN_PVR
srwi r0,r0,16 srwi r0,r0,16
cmpwi r0,0x39 cmpwi cr0,r0,0x39
cmpwi cr1,r0,0x3c
cror 4*cr0+eq,4*cr0+eq,4*cr1+eq
bnelr bnelr
/* Make sure HID4:rm_ci is off before MMU is turned off, that large
* pages are enabled with HID4:61 and clear HID5:DCBZ_size and
* HID5:DCBZ32_ill
*/
li r0,0 li r0,0
mfspr r11,SPRN_HID4
rldimi r11,r0,40,23 /* clear bit 23 (rm_ci) */
rldimi r11,r0,2,61 /* clear bit 61 (lg_pg_en) */
sync sync
mtspr SPRN_HID4,r0 mtspr SPRN_HID4,r11
isync isync
sync sync
mtspr SPRN_HID5,r0 mfspr r11,SPRN_HID5
rldimi r11,r0,6,56 /* clear bits 56 & 57 (DCBZ*) */
sync
mtspr SPRN_HID5,r11
isync isync
sync
/* Setup some basic HID1 features */
mfspr r0,SPRN_HID1 mfspr r0,SPRN_HID1
li r11,0x1200 /* enable i-fetch cacheability */ li r11,0x1200 /* enable i-fetch cacheability */
sldi r11,r11,44 /* and prefetch */ sldi r11,r11,44 /* and prefetch */
...@@ -43,6 +56,8 @@ _GLOBAL(__power4_cpu_preinit) ...@@ -43,6 +56,8 @@ _GLOBAL(__power4_cpu_preinit)
mtspr SPRN_HID1,r0 mtspr SPRN_HID1,r0
mtspr SPRN_HID1,r0 mtspr SPRN_HID1,r0
isync isync
/* Clear HIOR */
li r0,0 li r0,0
sync sync
mtspr SPRN_HIOR,0 /* Clear interrupt prefix */ mtspr SPRN_HIOR,0 /* Clear interrupt prefix */
......
...@@ -323,6 +323,17 @@ struct cpu_spec cpu_specs[] = { ...@@ -323,6 +323,17 @@ struct cpu_spec cpu_specs[] = {
32, 32, 32, 32,
__setup_cpu_745x __setup_cpu_745x
}, },
{ /* 7447A */
0xffff0000, 0x80030000, "7447A",
CPU_FTR_COMMON |
CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_CAN_NAP |
CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP |
CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR |
CPU_FTR_HAS_HIGH_BATS,
COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP,
32, 32,
__setup_cpu_745x
},
{ /* 82xx (8240, 8245, 8260 are all 603e cores) */ { /* 82xx (8240, 8245, 8260 are all 603e cores) */
0x7fff0000, 0x00810000, "82xx", 0x7fff0000, 0x00810000, "82xx",
CPU_FTR_COMMON | CPU_FTR_COMMON |
......
...@@ -153,7 +153,7 @@ __start: ...@@ -153,7 +153,7 @@ __start:
* like real mode cache inhibit or exception base * like real mode cache inhibit or exception base
*/ */
#ifdef CONFIG_POWER4 #ifdef CONFIG_POWER4
bl __power4_cpu_preinit bl __970_cpu_preinit
#endif /* CONFIG_POWER4 */ #endif /* CONFIG_POWER4 */
#ifdef CONFIG_APUS #ifdef CONFIG_APUS
......
...@@ -578,7 +578,6 @@ heathrow_sleep(struct macio_chip* macio, int secondary) ...@@ -578,7 +578,6 @@ heathrow_sleep(struct macio_chip* macio, int secondary)
/* Let things settle */ /* Let things settle */
(void)MACIO_IN32(HEATHROW_FCR); (void)MACIO_IN32(HEATHROW_FCR);
mdelay(1);
} }
static void __pmac static void __pmac
...@@ -2102,7 +2101,7 @@ static struct pmac_mb_def pmac_mb_defs[] __pmacdata = { ...@@ -2102,7 +2101,7 @@ static struct pmac_mb_def pmac_mb_defs[] __pmacdata = {
0, 0,
}, },
{ "PowerMac3,6", "PowerMac G4 Windtunnel", { "PowerMac3,6", "PowerMac G4 Windtunnel",
PMAC_TYPE_WINDTUNNEL, rackmac_features, PMAC_TYPE_WINDTUNNEL, core99_features,
0, 0,
}, },
{ "PowerBook5,1", "PowerBook G4 17\"", { "PowerBook5,1", "PowerBook G4 17\"",
...@@ -2129,6 +2128,10 @@ static struct pmac_mb_def pmac_mb_defs[] __pmacdata = { ...@@ -2129,6 +2128,10 @@ static struct pmac_mb_def pmac_mb_defs[] __pmacdata = {
PMAC_TYPE_UNKNOWN_INTREPID, intrepid_features, PMAC_TYPE_UNKNOWN_INTREPID, intrepid_features,
PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE, PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
}, },
{ "PowerBook6,5", "iBook G4",
PMAC_TYPE_UNKNOWN_INTREPID, intrepid_features,
PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
},
#else /* CONFIG_POWER4 */ #else /* CONFIG_POWER4 */
{ "PowerMac7,2", "PowerMac G5", { "PowerMac7,2", "PowerMac G5",
PMAC_TYPE_POWERMAC_G5, g5_features, PMAC_TYPE_POWERMAC_G5, g5_features,
......
...@@ -18,31 +18,53 @@ ...@@ -18,31 +18,53 @@
#include <asm/offsets.h> #include <asm/offsets.h>
#include <asm/cache.h> #include <asm/cache.h>
_GLOBAL(__power4_cpu_preinit) _GLOBAL(__970_cpu_preinit)
/* /*
* On the PPC970, we have to turn off real-mode cache inhibit * Do nothing if not running in HV mode
* early, before we first turn the MMU off. */
mfmsr r0
rldicl. r0,r0,4,63
beqlr
/*
* Deal only with PPC970 and PPC970FX.
*/ */
mfspr r0,SPRN_PVR mfspr r0,SPRN_PVR
srwi r0,r0,16 srwi r0,r0,16
cmpwi r0,0x39 cmpwi cr0,r0,0x39
cmpwi cr1,r0,0x3c
cror 4*cr0+eq,4*cr0+eq,4*cr1+eq
bnelr bnelr
/* Make sure HID4:rm_ci is off before MMU is turned off, that large
* pages are enabled with HID4:61 and clear HID5:DCBZ_size and
* HID5:DCBZ32_ill
*/
li r0,0 li r0,0
mfspr r3,SPRN_HID4
rldimi r3,r0,40,23 /* clear bit 23 (rm_ci) */
rldimi r3,r0,2,61 /* clear bit 61 (lg_pg_en) */
sync sync
mtspr SPRN_HID4,r0 mtspr SPRN_HID4,r3
isync isync
sync sync
mtspr SPRN_HID5,r0 mfspr r3,SPRN_HID5
rldimi r3,r0,6,56 /* clear bits 56 & 57 (DCBZ*) */
sync
mtspr SPRN_HID5,r3
isync isync
sync
/* Setup some basic HID1 features */
mfspr r0,SPRN_HID1 mfspr r0,SPRN_HID1
li r11,0x1200 /* enable i-fetch cacheability */ li r3,0x1200 /* enable i-fetch cacheability */
sldi r11,r11,44 /* and prefetch */ sldi r3,r3,44 /* and prefetch */
or r0,r0,r11 or r0,r0,r3
mtspr SPRN_HID1,r0 mtspr SPRN_HID1,r0
mtspr SPRN_HID1,r0 mtspr SPRN_HID1,r0
isync isync
/* Clear HIOR */
li r0,0 li r0,0
sync sync
mtspr SPRN_HIOR,0 /* Clear interrupt prefix */ mtspr SPRN_HIOR,0 /* Clear interrupt prefix */
......
...@@ -1469,7 +1469,7 @@ _GLOBAL(__start_initialization_pSeries) ...@@ -1469,7 +1469,7 @@ _GLOBAL(__start_initialization_pSeries)
mr r23,r3 /* Save phys address we are running at */ mr r23,r3 /* Save phys address we are running at */
/* Setup some critical 970 SPRs before switching MMU off */ /* Setup some critical 970 SPRs before switching MMU off */
bl .__power4_cpu_preinit bl .__970_cpu_preinit
li r24,0 /* cpu # */ li r24,0 /* cpu # */
......
...@@ -184,4 +184,10 @@ static inline void dma_cache_sync(void *vaddr, size_t size, ...@@ -184,4 +184,10 @@ static inline void dma_cache_sync(void *vaddr, size_t size,
{ {
consistent_sync(vaddr, size, (int)direction); consistent_sync(vaddr, size, (int)direction);
} }
static inline int dma_mapping_error(dma_addr_t dma_addr)
{
return 0;
}
#endif /* __ASM_PPC_DMA_MAPPING_H */ #endif /* __ASM_PPC_DMA_MAPPING_H */
...@@ -290,6 +290,11 @@ pci_dac_dma_sync_single_for_device(struct pci_dev *pdev, dma64_addr_t dma_addr, ...@@ -290,6 +290,11 @@ pci_dac_dma_sync_single_for_device(struct pci_dev *pdev, dma64_addr_t dma_addr,
/* Nothing to do. */ /* Nothing to do. */
} }
static inline int pci_dma_mapping_error(dma_addr_t dma_addr)
{
return 0;
}
/* Return the index of the PCI controller for device PDEV. */ /* Return the index of the PCI controller for device PDEV. */
#define pci_domain_nr(bus) ((struct pci_controller *)(bus)->sysdata)->index #define pci_domain_nr(bus) ((struct pci_controller *)(bus)->sysdata)->index
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment