* [PATCH 1/9] Small updates for Freescale MPC52xx
2004-09-14 11:38 [PATCH 0/9] Small updates for Freescale MPC52xx Sylvain Munaut
@ 2004-09-14 11:46 ` Sylvain Munaut
2004-09-14 11:48 ` [PATCH 2/9] " Sylvain Munaut
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Sylvain Munaut @ 2004-09-14 11:46 UTC (permalink / raw)
Cc: Andrew Morton, Linux PPC Dev, Paul Mackerras, Linux Kernel
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/09/13 21:04:47+02:00 tnt@246tNt.com
# ppc: Update name of Freescale MPC52xx platform (IceCube -> LITE5200)
#
# The official name is LITE5200, so we take this one for comments and
# functions names.
#
# Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
#
# arch/ppc/platforms/lite5200.c
# 2004/09/13 21:04:17+02:00 tnt@246tNt.com +5 -6
# ppc: Update name of Freescale MPC52xx platform (IceCube -> LITE5200)
#
diff -Nru a/arch/ppc/platforms/lite5200.c b/arch/ppc/platforms/lite5200.c
--- a/arch/ppc/platforms/lite5200.c 2004-09-14 12:47:23 +02:00
+++ b/arch/ppc/platforms/lite5200.c 2004-09-14 12:47:23 +02:00
@@ -71,16 +71,15 @@
/*
======================================================================== */
static int
-icecube_show_cpuinfo(struct seq_file *m)
+lite5200_show_cpuinfo(struct seq_file *m)
{
seq_printf(m, "machine\t\t: Freescale LITE5200\n");
return 0;
}
static void __init
-icecube_setup_arch(void)
+lite5200_setup_arch(void)
{
-
/* Add board OCP definitions */
mpc52xx_add_board_devices(board_ocp);
}
@@ -126,8 +125,8 @@
isa_mem_base = 0;
/* Setup the ppc_md struct */
- ppc_md.setup_arch = icecube_setup_arch;
- ppc_md.show_cpuinfo = icecube_show_cpuinfo;
+ ppc_md.setup_arch = lite5200_setup_arch;
+ ppc_md.show_cpuinfo = lite5200_show_cpuinfo;
ppc_md.show_percpuinfo = NULL;
ppc_md.init_IRQ = mpc52xx_init_irq;
ppc_md.get_irq = mpc52xx_get_irq;
@@ -139,7 +138,7 @@
ppc_md.power_off = mpc52xx_power_off;
ppc_md.halt = mpc52xx_halt;
- /* No time keeper on the IceCube */
+ /* No time keeper on the LITE5200 */
ppc_md.time_init = NULL;
ppc_md.get_rtc_time = NULL;
ppc_md.set_rtc_time = NULL;
^ permalink raw reply [flat|nested] 11+ messages in thread* [PATCH 2/9] Small updates for Freescale MPC52xx
2004-09-14 11:38 [PATCH 0/9] Small updates for Freescale MPC52xx Sylvain Munaut
2004-09-14 11:46 ` [PATCH 1/9] " Sylvain Munaut
@ 2004-09-14 11:48 ` Sylvain Munaut
2004-09-14 11:50 ` [PATCH 3/9] " Sylvain Munaut
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Sylvain Munaut @ 2004-09-14 11:48 UTC (permalink / raw)
Cc: Andrew Morton, Linux PPC Dev, Paul Mackerras, Linux Kernel
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/09/13 21:16:32+02:00 tnt@246tNt.com
# ppc: Fix missing include in Freescale MPC52xx syslib
#
# pgtable.h is needed for _PAGE_IO
#
# Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
#
# arch/ppc/syslib/mpc52xx_setup.c
# 2004/09/13 21:16:20+02:00 tnt@246tNt.com +1 -0
# ppc: Fix missing include in Freescale MPC52xx syslib
#
diff -Nru a/arch/ppc/syslib/mpc52xx_setup.c
b/arch/ppc/syslib/mpc52xx_setup.c
--- a/arch/ppc/syslib/mpc52xx_setup.c 2004-09-14 12:47:30 +02:00
+++ b/arch/ppc/syslib/mpc52xx_setup.c 2004-09-14 12:47:30 +02:00
@@ -23,6 +23,7 @@
#include <asm/mpc52xx.h>
#include <asm/mpc52xx_psc.h>
#include <asm/ocp.h>
+#include <asm/pgtable.h>
#include <asm/ppcboot.h>
extern bd_t __res;
^ permalink raw reply [flat|nested] 11+ messages in thread* [PATCH 3/9] Small updates for Freescale MPC52xx
2004-09-14 11:38 [PATCH 0/9] Small updates for Freescale MPC52xx Sylvain Munaut
2004-09-14 11:46 ` [PATCH 1/9] " Sylvain Munaut
2004-09-14 11:48 ` [PATCH 2/9] " Sylvain Munaut
@ 2004-09-14 11:50 ` Sylvain Munaut
2004-09-14 11:50 ` [PATCH 4/9] " Sylvain Munaut
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Sylvain Munaut @ 2004-09-14 11:50 UTC (permalink / raw)
Cc: Andrew Morton, Linux PPC Dev, Paul Mackerras, Linux Kernel
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/09/14 00:02:45+02:00 tnt@246tNt.com
# ppc: Use dummy_con for conswitchp on Freescale MPC52xx platforms
#
# Apparently needed for when virtual consoles are enabled.
#
# Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
# Signed-off-by: Sylvain Munaut <tnt246tNt.com>
#
# arch/ppc/platforms/lite5200.c
# 2004/09/14 00:02:31+02:00 tnt@246tNt.com +4 -0
# ppc: Use dummy_con for conswitchp on Freescale MPC52xx platforms
#
diff -Nru a/arch/ppc/platforms/lite5200.c b/arch/ppc/platforms/lite5200.c
--- a/arch/ppc/platforms/lite5200.c 2004-09-14 12:47:37 +02:00
+++ b/arch/ppc/platforms/lite5200.c 2004-09-14 12:47:37 +02:00
@@ -147,5 +147,9 @@
#ifdef CONFIG_SERIAL_TEXT_DEBUG
ppc_md.progress = mpc52xx_progress;
#endif
+
+#ifdef CONFIG_DUMMY_CONSOLE
+ conswitchp = &dummy_con;
+#endif
}
^ permalink raw reply [flat|nested] 11+ messages in thread* [PATCH 4/9] Small updates for Freescale MPC52xx
2004-09-14 11:38 [PATCH 0/9] Small updates for Freescale MPC52xx Sylvain Munaut
` (2 preceding siblings ...)
2004-09-14 11:50 ` [PATCH 3/9] " Sylvain Munaut
@ 2004-09-14 11:50 ` Sylvain Munaut
2004-09-14 11:54 ` [PATCH 5/9] " Sylvain Munaut
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Sylvain Munaut @ 2004-09-14 11:50 UTC (permalink / raw)
To: Sylvain Munaut; +Cc: Andrew Morton, Linux PPC Dev, Paul Mackerras, Linux Kernel
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/09/14 00:07:12+02:00 tnt@246tNt.com
# ppc: Use interactive console for Freescale MPC52xx when using
boot/simple
#
# Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
# Signed-off-by: Sylvain Munaut <tnt246tNt.com>
#
# arch/ppc/boot/simple/misc.c
# 2004/09/14 00:07:01+02:00 tnt@246tNt.com +3 -1
# ppc: Use interactive console for Freescale MPC52xx when using
boot/simple
#
diff -Nru a/arch/ppc/boot/simple/misc.c b/arch/ppc/boot/simple/misc.c
--- a/arch/ppc/boot/simple/misc.c 2004-09-14 12:47:44 +02:00
+++ b/arch/ppc/boot/simple/misc.c 2004-09-14 12:47:44 +02:00
@@ -48,7 +48,9 @@
* Val Henson has requested that Gemini doesn't wait for the
* user to edit the cmdline or not.
*/
-#if (defined(CONFIG_SERIAL_8250_CONSOLE) || defined(CONFIG_VGA_CONSOLE)) \
+#if (defined(CONFIG_SERIAL_8250_CONSOLE) \
+ || defined(CONFIG_VGA_CONSOLE) \
+ || defined(CONFIG_SERIAL_MPC52xx_CONSOLE)) \
&& !defined(CONFIG_GEMINI)
#define INTERACTIVE_CONSOLE 1
#endif
^ permalink raw reply [flat|nested] 11+ messages in thread* [PATCH 5/9] Small updates for Freescale MPC52xx
2004-09-14 11:38 [PATCH 0/9] Small updates for Freescale MPC52xx Sylvain Munaut
` (3 preceding siblings ...)
2004-09-14 11:50 ` [PATCH 4/9] " Sylvain Munaut
@ 2004-09-14 11:54 ` Sylvain Munaut
2004-09-14 11:59 ` [PATCH 6/9] " Sylvain Munaut
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Sylvain Munaut @ 2004-09-14 11:54 UTC (permalink / raw)
Cc: Andrew Morton, Linux PPC Dev, Paul Mackerras, Linux Kernel
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/09/14 00:25:36+02:00 tnt@246tNt.com
# ppc: Fix spurious iounmap in Freescale MPC52xx syslib
#
# Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
#
# arch/ppc/syslib/mpc52xx_setup.c
# 2004/09/14 00:25:27+02:00 tnt@246tNt.com +0 -2
# ppc: Fix spurious iounmap in Freescale MPC52xx syslib
#
diff -Nru a/arch/ppc/syslib/mpc52xx_setup.c
b/arch/ppc/syslib/mpc52xx_setup.c
--- a/arch/ppc/syslib/mpc52xx_setup.c 2004-09-14 12:47:51 +02:00
+++ b/arch/ppc/syslib/mpc52xx_setup.c 2004-09-14 12:47:51 +02:00
@@ -148,8 +148,6 @@
if (((sdram_config_1 & 0x1f) >= 0x13) &&
((sdram_config_1 & 0xfff00000) == ramsize))
ramsize += 1 << ((sdram_config_1 & 0xf) + 17);
-
- iounmap(mmap_ctl);
}
return ramsize;
^ permalink raw reply [flat|nested] 11+ messages in thread* [PATCH 6/9] Small updates for Freescale MPC52xx
2004-09-14 11:38 [PATCH 0/9] Small updates for Freescale MPC52xx Sylvain Munaut
` (4 preceding siblings ...)
2004-09-14 11:54 ` [PATCH 5/9] " Sylvain Munaut
@ 2004-09-14 11:59 ` Sylvain Munaut
2004-09-14 12:00 ` [PATCH 7/9] " Sylvain Munaut
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Sylvain Munaut @ 2004-09-14 11:59 UTC (permalink / raw)
Cc: Andrew Morton, Linux PPC Dev, Paul Mackerras, Linux Kernel
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/09/14 11:34:48+02:00 tnt@246tNt.com
# ppc: Freescale MPC52xx hardware definitions misc updates/fix
#
# Mainly this includes :
# - Remove the 'volatile' keyword in structs defining hardware
registers sets.
# This keyword is useless and can even be harmful if it makes
someone believes
# it's sufficient to access a register like a variable. It's not !
And the
# registers must be accessed with the appropriate in_be/out_be. So
we remove
# this keyword as it's wrong and misleading.
# - Some fixes to SDMA
# - Add SRAM unit
# - Remove of useless #define
#
# Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
#
# include/asm-ppc/mpc52xx_psc.h
# 2004/09/14 11:34:35+02:00 tnt@246tNt.com +78 -78
# ppc: Freescale MPC52xx hardware definitions misc updates/fix
#
# include/asm-ppc/mpc52xx.h
# 2004/09/14 11:34:35+02:00 tnt@246tNt.com +164 -157
# ppc: Freescale MPC52xx hardware definitions misc updates/fix
#
diff -Nru a/include/asm-ppc/mpc52xx.h b/include/asm-ppc/mpc52xx.h
--- a/include/asm-ppc/mpc52xx.h 2004-09-14 12:47:58 +02:00
+++ b/include/asm-ppc/mpc52xx.h 2004-09-14 12:47:58 +02:00
@@ -42,6 +42,7 @@
#define MPC52xx_MBAR_VIRT 0xf0000000 /* Virt address */
#define MPC52xx_MMAP_CTL (MPC52xx_MBAR + 0x0000)
+#define MPC52xx_SDRAM (MPC52xx_MBAR + 0x0100)
#define MPC52xx_CDM (MPC52xx_MBAR + 0x0200)
#define MPC52xx_SFTRST (MPC52xx_MBAR + 0x0220)
#define MPC52xx_SFTRST_BIT 0x01000000
@@ -71,10 +72,6 @@
/* SRAM used for SDMA */
#define MPC52xx_SRAM (MPC52xx_MBAR + 0x8000)
#define MPC52xx_SRAM_SIZE (16*1024)
-#define MPC52xx_SDMA_MAX_TASKS 16
-
- /* Memory allocation block size */
-#define MPC52xx_SDRAM_UNIT 0x8000 /* 32K byte */
/*
======================================================================== */
@@ -137,136 +134,145 @@
/* Memory Mapping Control */
struct mpc52xx_mmap_ctl {
- volatile u32 mbar; /* MMAP_CTRL + 0x00 */
+ u32 mbar; /* MMAP_CTRL + 0x00 */
- volatile u32 cs0_start; /* MMAP_CTRL + 0x04 */
- volatile u32 cs0_stop; /* MMAP_CTRL + 0x08 */
- volatile u32 cs1_start; /* MMAP_CTRL + 0x0c */
- volatile u32 cs1_stop; /* MMAP_CTRL + 0x10 */
- volatile u32 cs2_start; /* MMAP_CTRL + 0x14 */
- volatile u32 cs2_stop; /* MMAP_CTRL + 0x18 */
- volatile u32 cs3_start; /* MMAP_CTRL + 0x1c */
- volatile u32 cs3_stop; /* MMAP_CTRL + 0x20 */
- volatile u32 cs4_start; /* MMAP_CTRL + 0x24 */
- volatile u32 cs4_stop; /* MMAP_CTRL + 0x28 */
- volatile u32 cs5_start; /* MMAP_CTRL + 0x2c */
- volatile u32 cs5_stop; /* MMAP_CTRL + 0x30 */
+ u32 cs0_start; /* MMAP_CTRL + 0x04 */
+ u32 cs0_stop; /* MMAP_CTRL + 0x08 */
+ u32 cs1_start; /* MMAP_CTRL + 0x0c */
+ u32 cs1_stop; /* MMAP_CTRL + 0x10 */
+ u32 cs2_start; /* MMAP_CTRL + 0x14 */
+ u32 cs2_stop; /* MMAP_CTRL + 0x18 */
+ u32 cs3_start; /* MMAP_CTRL + 0x1c */
+ u32 cs3_stop; /* MMAP_CTRL + 0x20 */
+ u32 cs4_start; /* MMAP_CTRL + 0x24 */
+ u32 cs4_stop; /* MMAP_CTRL + 0x28 */
+ u32 cs5_start; /* MMAP_CTRL + 0x2c */
+ u32 cs5_stop; /* MMAP_CTRL + 0x30 */
- volatile u32 sdram0; /* MMAP_CTRL + 0x34 */
- volatile u32 sdram1; /* MMAP_CTRL + 0X38 */
+ u32 sdram0; /* MMAP_CTRL + 0x34 */
+ u32 sdram1; /* MMAP_CTRL + 0X38 */
- volatile u32 reserved[4]; /* MMAP_CTRL + 0x3c .. 0x48 */
+ u32 reserved[4]; /* MMAP_CTRL + 0x3c .. 0x48 */
- volatile u32 boot_start; /* MMAP_CTRL + 0x4c */
- volatile u32 boot_stop; /* MMAP_CTRL + 0x50 */
+ u32 boot_start; /* MMAP_CTRL + 0x4c */
+ u32 boot_stop; /* MMAP_CTRL + 0x50 */
- volatile u32 ipbi_ws_ctrl; /* MMAP_CTRL + 0x54 */
+ u32 ipbi_ws_ctrl; /* MMAP_CTRL + 0x54 */
- volatile u32 cs6_start; /* MMAP_CTRL + 0x58 */
- volatile u32 cs6_stop; /* MMAP_CTRL + 0x5c */
- volatile u32 cs7_start; /* MMAP_CTRL + 0x60 */
- volatile u32 cs7_stop; /* MMAP_CTRL + 0x60 */
+ u32 cs6_start; /* MMAP_CTRL + 0x58 */
+ u32 cs6_stop; /* MMAP_CTRL + 0x5c */
+ u32 cs7_start; /* MMAP_CTRL + 0x60 */
+ u32 cs7_stop; /* MMAP_CTRL + 0x60 */
+};
+
+/* SDRAM control */
+struct mpc52xx_sdram {
+ u32 mode; /* SDRAM + 0x00 */
+ u32 ctrl; /* SDRAM + 0x04 */
+ u32 config1; /* SDRAM + 0x08 */
+ u32 config2; /* SDRAM + 0x0c */
};
/* Interrupt controller */
struct mpc52xx_intr {
- volatile u32 per_mask; /* INTR + 0x00 */
- volatile u32 per_pri1; /* INTR + 0x04 */
- volatile u32 per_pri2; /* INTR + 0x08 */
- volatile u32 per_pri3; /* INTR + 0x0c */
- volatile u32 ctrl; /* INTR + 0x10 */
- volatile u32 main_mask; /* INTR + 0x14 */
- volatile u32 main_pri1; /* INTR + 0x18 */
- volatile u32 main_pri2; /* INTR + 0x1c */
- volatile u32 reserved1; /* INTR + 0x20 */
- volatile u32 enc_status; /* INTR + 0x24 */
- volatile u32 crit_status; /* INTR + 0x28 */
- volatile u32 main_status; /* INTR + 0x2c */
- volatile u32 per_status; /* INTR + 0x30 */
- volatile u32 reserved2; /* INTR + 0x34 */
- volatile u32 per_error; /* INTR + 0x38 */
+ u32 per_mask; /* INTR + 0x00 */
+ u32 per_pri1; /* INTR + 0x04 */
+ u32 per_pri2; /* INTR + 0x08 */
+ u32 per_pri3; /* INTR + 0x0c */
+ u32 ctrl; /* INTR + 0x10 */
+ u32 main_mask; /* INTR + 0x14 */
+ u32 main_pri1; /* INTR + 0x18 */
+ u32 main_pri2; /* INTR + 0x1c */
+ u32 reserved1; /* INTR + 0x20 */
+ u32 enc_status; /* INTR + 0x24 */
+ u32 crit_status; /* INTR + 0x28 */
+ u32 main_status; /* INTR + 0x2c */
+ u32 per_status; /* INTR + 0x30 */
+ u32 reserved2; /* INTR + 0x34 */
+ u32 per_error; /* INTR + 0x38 */
};
/* SDMA */
struct mpc52xx_sdma {
- volatile u32 taskBar; /* SDMA + 0x00 */
- volatile u32 currentPointer; /* SDMA + 0x04 */
- volatile u32 endPointer; /* SDMA + 0x08 */
- volatile u32 variablePointer;/* SDMA + 0x0c */
-
- volatile u8 IntVect1; /* SDMA + 0x10 */
- volatile u8 IntVect2; /* SDMA + 0x11 */
- volatile u16 PtdCntrl; /* SDMA + 0x12 */
+ u32 taskBar; /* SDMA + 0x00 */
+ u32 currentPointer; /* SDMA + 0x04 */
+ u32 endPointer; /* SDMA + 0x08 */
+ u32 variablePointer;/* SDMA + 0x0c */
+
+ u8 IntVect1; /* SDMA + 0x10 */
+ u8 IntVect2; /* SDMA + 0x11 */
+ u16 PtdCntrl; /* SDMA + 0x12 */
- volatile u32 IntPend; /* SDMA + 0x14 */
- volatile u32 IntMask; /* SDMA + 0x18 */
+ u32 IntPend; /* SDMA + 0x14 */
+ u32 IntMask; /* SDMA + 0x18 */
- volatile u16 tcr[16]; /* SDMA + 0x1c .. 0x3a */
+ u16 tcr[16]; /* SDMA + 0x1c .. 0x3a */
- volatile u8 ipr[31]; /* SDMA + 0x3c .. 5b */
+ u8 ipr[32]; /* SDMA + 0x3c .. 5b */
- volatile u32 res1; /* SDMA + 0x5c */
- volatile u32 task_size0; /* SDMA + 0x60 */
- volatile u32 task_size1; /* SDMA + 0x64 */
- volatile u32 MDEDebug; /* SDMA + 0x68 */
- volatile u32 ADSDebug; /* SDMA + 0x6c */
- volatile u32 Value1; /* SDMA + 0x70 */
- volatile u32 Value2; /* SDMA + 0x74 */
- volatile u32 Control; /* SDMA + 0x78 */
- volatile u32 Status; /* SDMA + 0x7c */
+ u32 cReqSelect; /* SDMA + 0x5c */
+ u32 task_size0; /* SDMA + 0x60 */
+ u32 task_size1; /* SDMA + 0x64 */
+ u32 MDEDebug; /* SDMA + 0x68 */
+ u32 ADSDebug; /* SDMA + 0x6c */
+ u32 Value1; /* SDMA + 0x70 */
+ u32 Value2; /* SDMA + 0x74 */
+ u32 Control; /* SDMA + 0x78 */
+ u32 Status; /* SDMA + 0x7c */
+ u32 PTDDebug; /* SDMA + 0x80 */
};
/* GPT */
struct mpc52xx_gpt {
- volatile u32 mode; /* GPTx + 0x00 */
- volatile u32 count; /* GPTx + 0x04 */
- volatile u32 pwm; /* GPTx + 0x08 */
- volatile u32 status; /* GPTx + 0X0c */
+ u32 mode; /* GPTx + 0x00 */
+ u32 count; /* GPTx + 0x04 */
+ u32 pwm; /* GPTx + 0x08 */
+ u32 status; /* GPTx + 0X0c */
};
/* RTC */
struct mpc52xx_rtc {
- volatile u32 time_set; /* RTC + 0x00 */
- volatile u32 date_set; /* RTC + 0x04 */
- volatile u32 stopwatch; /* RTC + 0x08 */
- volatile u32 int_enable; /* RTC + 0x0c */
- volatile u32 time; /* RTC + 0x10 */
- volatile u32 date; /* RTC + 0x14 */
- volatile u32 stopwatch_intr; /* RTC + 0x18 */
- volatile u32 bus_error; /* RTC + 0x1c */
- volatile u32 dividers; /* RTC + 0x20 */
+ u32 time_set; /* RTC + 0x00 */
+ u32 date_set; /* RTC + 0x04 */
+ u32 stopwatch; /* RTC + 0x08 */
+ u32 int_enable; /* RTC + 0x0c */
+ u32 time; /* RTC + 0x10 */
+ u32 date; /* RTC + 0x14 */
+ u32 stopwatch_intr; /* RTC + 0x18 */
+ u32 bus_error; /* RTC + 0x1c */
+ u32 dividers; /* RTC + 0x20 */
};
/* GPIO */
struct mpc52xx_gpio {
- volatile u32 port_config; /* GPIO + 0x00 */
- volatile u32 simple_gpioe; /* GPIO + 0x04 */
- volatile u32 simple_ode; /* GPIO + 0x08 */
- volatile u32 simple_ddr; /* GPIO + 0x0c */
- volatile u32 simple_dvo; /* GPIO + 0x10 */
- volatile u32 simple_ival; /* GPIO + 0x14 */
- volatile u8 outo_gpioe; /* GPIO + 0x18 */
- volatile u8 reserved1[3]; /* GPIO + 0x19 */
- volatile u8 outo_dvo; /* GPIO + 0x1c */
- volatile u8 reserved2[3]; /* GPIO + 0x1d */
- volatile u8 sint_gpioe; /* GPIO + 0x20 */
- volatile u8 reserved3[3]; /* GPIO + 0x21 */
- volatile u8 sint_ode; /* GPIO + 0x24 */
- volatile u8 reserved4[3]; /* GPIO + 0x25 */
- volatile u8 sint_ddr; /* GPIO + 0x28 */
- volatile u8 reserved5[3]; /* GPIO + 0x29 */
- volatile u8 sint_dvo; /* GPIO + 0x2c */
- volatile u8 reserved6[3]; /* GPIO + 0x2d */
- volatile u8 sint_inten; /* GPIO + 0x30 */
- volatile u8 reserved7[3]; /* GPIO + 0x31 */
- volatile u16 sint_itype; /* GPIO + 0x34 */
- volatile u16 reserved8; /* GPIO + 0x36 */
- volatile u8 gpio_control; /* GPIO + 0x38 */
- volatile u8 reserved9[3]; /* GPIO + 0x39 */
- volatile u8 sint_istat; /* GPIO + 0x3c */
- volatile u8 sint_ival; /* GPIO + 0x3d */
- volatile u8 bus_errs; /* GPIO + 0x3e */
- volatile u8 reserved10; /* GPIO + 0x3f */
+ u32 port_config; /* GPIO + 0x00 */
+ u32 simple_gpioe; /* GPIO + 0x04 */
+ u32 simple_ode; /* GPIO + 0x08 */
+ u32 simple_ddr; /* GPIO + 0x0c */
+ u32 simple_dvo; /* GPIO + 0x10 */
+ u32 simple_ival; /* GPIO + 0x14 */
+ u8 outo_gpioe; /* GPIO + 0x18 */
+ u8 reserved1[3]; /* GPIO + 0x19 */
+ u8 outo_dvo; /* GPIO + 0x1c */
+ u8 reserved2[3]; /* GPIO + 0x1d */
+ u8 sint_gpioe; /* GPIO + 0x20 */
+ u8 reserved3[3]; /* GPIO + 0x21 */
+ u8 sint_ode; /* GPIO + 0x24 */
+ u8 reserved4[3]; /* GPIO + 0x25 */
+ u8 sint_ddr; /* GPIO + 0x28 */
+ u8 reserved5[3]; /* GPIO + 0x29 */
+ u8 sint_dvo; /* GPIO + 0x2c */
+ u8 reserved6[3]; /* GPIO + 0x2d */
+ u8 sint_inten; /* GPIO + 0x30 */
+ u8 reserved7[3]; /* GPIO + 0x31 */
+ u16 sint_itype; /* GPIO + 0x34 */
+ u16 reserved8; /* GPIO + 0x36 */
+ u8 gpio_control; /* GPIO + 0x38 */
+ u8 reserved9[3]; /* GPIO + 0x39 */
+ u8 sint_istat; /* GPIO + 0x3c */
+ u8 sint_ival; /* GPIO + 0x3d */
+ u8 bus_errs; /* GPIO + 0x3e */
+ u8 reserved10; /* GPIO + 0x3f */
};
#define MPC52xx_GPIO_PSC_CONFIG_UART_WITHOUT_CD 4
@@ -275,68 +281,69 @@
/* XLB Bus control */
struct mpc52xx_xlb {
- volatile u8 reserved[0x40];
- volatile u32 config; /* XLB + 0x40 */
- volatile u32 version; /* XLB + 0x44 */
- volatile u32 status; /* XLB + 0x48 */
- volatile u32 int_enable; /* XLB + 0x4c */
- volatile u32 addr_capture; /* XLB + 0x50 */
- volatile u32 bus_sig_capture; /* XLB + 0x54 */
- volatile u32 addr_timeout; /* XLB + 0x58 */
- volatile u32 data_timeout; /* XLB + 0x5c */
- volatile u32 bus_act_timeout; /* XLB + 0x60 */
- volatile u32 master_pri_enable; /* XLB + 0x64 */
- volatile u32 master_priority; /* XLB + 0x68 */
- volatile u32 base_address; /* XLB + 0x6c */
- volatile u32 snoop_window; /* XLB + 0x70 */
+ u8 reserved[0x40];
+ u32 config; /* XLB + 0x40 */
+ u32 version; /* XLB + 0x44 */
+ u32 status; /* XLB + 0x48 */
+ u32 int_enable; /* XLB + 0x4c */
+ u32 addr_capture; /* XLB + 0x50 */
+ u32 bus_sig_capture; /* XLB + 0x54 */
+ u32 addr_timeout; /* XLB + 0x58 */
+ u32 data_timeout; /* XLB + 0x5c */
+ u32 bus_act_timeout; /* XLB + 0x60 */
+ u32 master_pri_enable; /* XLB + 0x64 */
+ u32 master_priority; /* XLB + 0x68 */
+ u32 base_address; /* XLB + 0x6c */
+ u32 snoop_window; /* XLB + 0x70 */
};
+#define MPC52xx_XLB_CFG_SNOOP (1 << 15)
/* Clock Distribution control */
struct mpc52xx_cdm {
- volatile u32 jtag_id; /* MBAR_CDM + 0x00 reg0 read
only */
- volatile u32 rstcfg; /* MBAR_CDM + 0x04 reg1 read
only */
- volatile u32 breadcrumb; /* MBAR_CDM + 0x08 reg2 */
-
- volatile u8 mem_clk_sel; /* MBAR_CDM + 0x0c reg3 byte0 */
- volatile u8 xlb_clk_sel; /* MBAR_CDM + 0x0d reg3 byte1
read only
*/
- volatile u8 ipb_clk_sel; /* MBAR_CDM + 0x0e reg3 byte2 */
- volatile u8 pci_clk_sel; /* MBAR_CDM + 0x0f reg3 byte3 */
-
- volatile u8 ext_48mhz_en; /* MBAR_CDM + 0x10 reg4 byte0 */
- volatile u8 fd_enable; /* MBAR_CDM + 0x11 reg4 byte1 */
- volatile u16 fd_counters; /* MBAR_CDM + 0x12 reg4 byte2,3 */
-
- volatile u32 clk_enables; /* MBAR_CDM + 0x14 reg5 */
-
- volatile u8 osc_disable; /* MBAR_CDM + 0x18 reg6 byte0 */
- volatile u8 reserved0[3]; /* MBAR_CDM + 0x19 reg6
byte1,2,3 */
-
- volatile u8 ccs_sleep_enable;/* MBAR_CDM + 0x1c reg7 byte0 */
- volatile u8 osc_sleep_enable;/* MBAR_CDM + 0x1d reg7 byte1 */
- volatile u8 reserved1; /* MBAR_CDM + 0x1e reg7 byte2 */
- volatile u8 ccs_qreq_test; /* MBAR_CDM + 0x1f reg7 byte3 */
-
- volatile u8 soft_reset; /* MBAR_CDM + 0x20 u8 byte0 */
- volatile u8 no_ckstp; /* MBAR_CDM + 0x21 u8 byte0 */
- volatile u8 reserved2[2]; /* MBAR_CDM + 0x22 u8 byte1,2,3 */
-
- volatile u8 pll_lock; /* MBAR_CDM + 0x24 reg9 byte0 */
- volatile u8 pll_looselock; /* MBAR_CDM + 0x25 reg9 byte1 */
- volatile u8 pll_sm_lockwin; /* MBAR_CDM + 0x26 reg9 byte2 */
- volatile u8 reserved3; /* MBAR_CDM + 0x27 reg9 byte3 */
+ u32 jtag_id; /* MBAR_CDM + 0x00 reg0 read only */
+ u32 rstcfg; /* MBAR_CDM + 0x04 reg1 read only */
+ u32 breadcrumb; /* MBAR_CDM + 0x08 reg2 */
+
+ u8 mem_clk_sel; /* MBAR_CDM + 0x0c reg3 byte0 */
+ u8 xlb_clk_sel; /* MBAR_CDM + 0x0d reg3 byte1 read only */
+ u8 ipb_clk_sel; /* MBAR_CDM + 0x0e reg3 byte2 */
+ u8 pci_clk_sel; /* MBAR_CDM + 0x0f reg3 byte3 */
+
+ u8 ext_48mhz_en; /* MBAR_CDM + 0x10 reg4 byte0 */
+ u8 fd_enable; /* MBAR_CDM + 0x11 reg4 byte1 */
+ u16 fd_counters; /* MBAR_CDM + 0x12 reg4 byte2,3 */
+
+ u32 clk_enables; /* MBAR_CDM + 0x14 reg5 */
+
+ u8 osc_disable; /* MBAR_CDM + 0x18 reg6 byte0 */
+ u8 reserved0[3]; /* MBAR_CDM + 0x19 reg6 byte1,2,3 */
+
+ u8 ccs_sleep_enable;/* MBAR_CDM + 0x1c reg7 byte0 */
+ u8 osc_sleep_enable;/* MBAR_CDM + 0x1d reg7 byte1 */
+ u8 reserved1; /* MBAR_CDM + 0x1e reg7 byte2 */
+ u8 ccs_qreq_test; /* MBAR_CDM + 0x1f reg7 byte3 */
+
+ u8 soft_reset; /* MBAR_CDM + 0x20 u8 byte0 */
+ u8 no_ckstp; /* MBAR_CDM + 0x21 u8 byte0 */
+ u8 reserved2[2]; /* MBAR_CDM + 0x22 u8 byte1,2,3 */
+
+ u8 pll_lock; /* MBAR_CDM + 0x24 reg9 byte0 */
+ u8 pll_looselock; /* MBAR_CDM + 0x25 reg9 byte1 */
+ u8 pll_sm_lockwin; /* MBAR_CDM + 0x26 reg9 byte2 */
+ u8 reserved3; /* MBAR_CDM + 0x27 reg9 byte3 */
- volatile u16 reserved4; /* MBAR_CDM + 0x28 reg10 byte0,1 */
- volatile u16 mclken_div_psc1;/* MBAR_CDM + 0x2a reg10 byte2,3 */
+ u16 reserved4; /* MBAR_CDM + 0x28 reg10 byte0,1 */
+ u16 mclken_div_psc1;/* MBAR_CDM + 0x2a reg10 byte2,3 */
- volatile u16 reserved5; /* MBAR_CDM + 0x2c reg11 byte0,1 */
- volatile u16 mclken_div_psc2;/* MBAR_CDM + 0x2e reg11 byte2,3 */
+ u16 reserved5; /* MBAR_CDM + 0x2c reg11 byte0,1 */
+ u16 mclken_div_psc2;/* MBAR_CDM + 0x2e reg11 byte2,3 */
- volatile u16 reserved6; /* MBAR_CDM + 0x30 reg12 byte0,1 */
- volatile u16 mclken_div_psc3;/* MBAR_CDM + 0x32 reg12 byte2,3 */
+ u16 reserved6; /* MBAR_CDM + 0x30 reg12 byte0,1 */
+ u16 mclken_div_psc3;/* MBAR_CDM + 0x32 reg12 byte2,3 */
- volatile u16 reserved7; /* MBAR_CDM + 0x34 reg13 byte0,1 */
- volatile u16 mclken_div_psc6;/* MBAR_CDM + 0x36 reg13 byte2,3 */
+ u16 reserved7; /* MBAR_CDM + 0x34 reg13 byte0,1 */
+ u16 mclken_div_psc6;/* MBAR_CDM + 0x36 reg13 byte2,3 */
};
#endif /* __ASSEMBLY__ */
diff -Nru a/include/asm-ppc/mpc52xx_psc.h b/include/asm-ppc/mpc52xx_psc.h
--- a/include/asm-ppc/mpc52xx_psc.h 2004-09-14 12:47:58 +02:00
+++ b/include/asm-ppc/mpc52xx_psc.h 2004-09-14 12:47:58 +02:00
@@ -95,96 +95,96 @@
/* Structure of the hardware registers */
struct mpc52xx_psc {
- volatile u8 mode; /* PSC + 0x00 */
- volatile u8 reserved0[3];
- union { /* PSC + 0x04 */
- volatile u16 status;
- volatile u16 clock_select;
+ u8 mode; /* PSC + 0x00 */
+ u8 reserved0[3];
+ union { /* PSC + 0x04 */
+ u16 status;
+ u16 clock_select;
} sr_csr;
#define mpc52xx_psc_status sr_csr.status
-#define mpc52xx_psc_clock_select sr_csr.clock_select
- volatile u16 reserved1;
- volatile u8 command; /* PSC + 0x08 */
-volatile u8 reserved2[3];
- union { /* PSC + 0x0c */
- volatile u8 buffer_8;
- volatile u16 buffer_16;
- volatile u32 buffer_32;
+#define mpc52xx_psc_clock_select sr_csr.clock_select
+ u16 reserved1;
+ u8 command; /* PSC + 0x08 */
+ u8 reserved2[3];
+ union { /* PSC + 0x0c */
+ u8 buffer_8;
+ u16 buffer_16;
+ u32 buffer_32;
} buffer;
#define mpc52xx_psc_buffer_8 buffer.buffer_8
#define mpc52xx_psc_buffer_16 buffer.buffer_16
#define mpc52xx_psc_buffer_32 buffer.buffer_32
- union { /* PSC + 0x10 */
- volatile u8 ipcr;
- volatile u8 acr;
+ union { /* PSC + 0x10 */
+ u8 ipcr;
+ u8 acr;
} ipcr_acr;
#define mpc52xx_psc_ipcr ipcr_acr.ipcr
#define mpc52xx_psc_acr ipcr_acr.acr
- volatile u8 reserved3[3];
- union { /* PSC + 0x14 */
- volatile u16 isr;
- volatile u16 imr;
+ u8 reserved3[3];
+ union { /* PSC + 0x14 */
+ u16 isr;
+ u16 imr;
} isr_imr;
#define mpc52xx_psc_isr isr_imr.isr
#define mpc52xx_psc_imr isr_imr.imr
- volatile u16 reserved4;
- volatile u8 ctur; /* PSC + 0x18 */
- volatile u8 reserved5[3];
- volatile u8 ctlr; /* PSC + 0x1c */
- volatile u8 reserved6[3];
- volatile u16 ccr; /* PSC + 0x20 */
- volatile u8 reserved7[14];
- volatile u8 ivr; /* PSC + 0x30 */
- volatile u8 reserved8[3];
- volatile u8 ip; /* PSC + 0x34 */
- volatile u8 reserved9[3];
- volatile u8 op1; /* PSC + 0x38 */
- volatile u8 reserved10[3];
- volatile u8 op0; /* PSC + 0x3c */
- volatile u8 reserved11[3];
- volatile u32 sicr; /* PSC + 0x40 */
- volatile u8 ircr1; /* PSC + 0x44 */
- volatile u8 reserved13[3];
- volatile u8 ircr2; /* PSC + 0x44 */
- volatile u8 reserved14[3];
- volatile u8 irsdr; /* PSC + 0x4c */
- volatile u8 reserved15[3];
- volatile u8 irmdr; /* PSC + 0x50 */
- volatile u8 reserved16[3];
- volatile u8 irfdr; /* PSC + 0x54 */
- volatile u8 reserved17[3];
- volatile u16 rfnum; /* PSC + 0x58 */
- volatile u16 reserved18;
- volatile u16 tfnum; /* PSC + 0x5c */
- volatile u16 reserved19;
- volatile u32 rfdata; /* PSC + 0x60 */
- volatile u16 rfstat; /* PSC + 0x64 */
- volatile u16 reserved20;
- volatile u8 rfcntl; /* PSC + 0x68 */
- volatile u8 reserved21[5];
- volatile u16 rfalarm; /* PSC + 0x6e */
- volatile u16 reserved22;
- volatile u16 rfrptr; /* PSC + 0x72 */
- volatile u16 reserved23;
- volatile u16 rfwptr; /* PSC + 0x76 */
- volatile u16 reserved24;
- volatile u16 rflrfptr; /* PSC + 0x7a */
- volatile u16 reserved25;
- volatile u16 rflwfptr; /* PSC + 0x7e */
- volatile u32 tfdata; /* PSC + 0x80 */
- volatile u16 tfstat; /* PSC + 0x84 */
- volatile u16 reserved26;
- volatile u8 tfcntl; /* PSC + 0x88 */
- volatile u8 reserved27[5];
- volatile u16 tfalarm; /* PSC + 0x8e */
- volatile u16 reserved28;
- volatile u16 tfrptr; /* PSC + 0x92 */
- volatile u16 reserved29;
- volatile u16 tfwptr; /* PSC + 0x96 */
- volatile u16 reserved30;
- volatile u16 tflrfptr; /* PSC + 0x9a */
- volatile u16 reserved31;
- volatile u16 tflwfptr; /* PSC + 0x9e */
+ u16 reserved4;
+ u8 ctur; /* PSC + 0x18 */
+ u8 reserved5[3];
+ u8 ctlr; /* PSC + 0x1c */
+ u8 reserved6[3];
+ u16 ccr; /* PSC + 0x20 */
+ u8 reserved7[14];
+ u8 ivr; /* PSC + 0x30 */
+ u8 reserved8[3];
+ u8 ip; /* PSC + 0x34 */
+ u8 reserved9[3];
+ u8 op1; /* PSC + 0x38 */
+ u8 reserved10[3];
+ u8 op0; /* PSC + 0x3c */
+ u8 reserved11[3];
+ u32 sicr; /* PSC + 0x40 */
+ u8 ircr1; /* PSC + 0x44 */
+ u8 reserved14[3];
+ u8 irsdr; /* PSC + 0x4c */
+ u8 reserved15[3];
+ u8 irmdr; /* PSC + 0x50 */
+ u8 reserved16[3];
+ u8 irfdr; /* PSC + 0x54 */
+ u8 reserved17[3];
+ u16 rfnum; /* PSC + 0x58 */
+ u16 reserved18;
+ u16 tfnum; /* PSC + 0x5c */
+ u16 reserved19;
+ u32 rfdata; /* PSC + 0x60 */
+ u16 rfstat; /* PSC + 0x64 */
+ u16 reserved20;
+ u8 rfcntl; /* PSC + 0x68 */
+ u8 reserved21[5];
+ u16 rfalarm; /* PSC + 0x6e */
+ u16 reserved22;
+ u16 rfrptr; /* PSC + 0x72 */
+ u16 reserved23;
+ u16 rfwptr; /* PSC + 0x76 */
+ u16 reserved24;
+ u16 rflrfptr; /* PSC + 0x7a */
+ u16 reserved25;
+ u16 rflwfptr; /* PSC + 0x7e */
+ u32 tfdata; /* PSC + 0x80 */
+ u16 tfstat; /* PSC + 0x84 */
+ u16 reserved26;
+ u8 tfcntl; /* PSC + 0x88 */
+ u8 reserved27[5];
+ u16 tfalarm; /* PSC + 0x8e */
+ u16 reserved28;
+ u16 tfrptr; /* PSC + 0x92 */
+ u16 reserved29;
+ u16 tfwptr; /* PSC + 0x96 */
+ u16 reserved30;
+ u16 tflrfptr; /* PSC + 0x9a */
+ u16 reserved31;
+ u16 tflwfptr; /* PSC + 0x9e */
};
^ permalink raw reply [flat|nested] 11+ messages in thread* [PATCH 7/9] Small updates for Freescale MPC52xx
2004-09-14 11:38 [PATCH 0/9] Small updates for Freescale MPC52xx Sylvain Munaut
` (5 preceding siblings ...)
2004-09-14 11:59 ` [PATCH 6/9] " Sylvain Munaut
@ 2004-09-14 12:00 ` Sylvain Munaut
2004-09-14 12:01 ` [PATCH 8/9] " Sylvain Munaut
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Sylvain Munaut @ 2004-09-14 12:00 UTC (permalink / raw)
Cc: Andrew Morton, Linux PPC Dev, Paul Mackerras, Linux Kernel
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/09/14 12:03:19+02:00 tnt@246tNt.com
# ppc: Update Freescale MPC52xx documentation / maintainer
#
# Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
#
# MAINTAINERS
# 2004/09/14 12:03:04+02:00 tnt@246tNt.com +8 -0
# ppc: Update Freescale MPC52xx documentation / maintainer
#
# Documentation/powerpc/mpc52xx.txt
# 2004/09/14 12:03:04+02:00 tnt@246tNt.com +1 -10
# ppc: Update Freescale MPC52xx documentation / maintainer
#
diff -Nru a/Documentation/powerpc/mpc52xx.txt
b/Documentation/powerpc/mpc52xx.tx
t
--- a/Documentation/powerpc/mpc52xx.txt 2004-09-14 12:48:06 +02:00
+++ b/Documentation/powerpc/mpc52xx.txt 2004-09-14 12:48:06 +02:00
@@ -1,7 +1,7 @@
Linux 2.6.x on MPC52xx family
-----------------------------
-For the latest info, go to http://www.246tNt.com/mpc52xx/state.txt
+For the latest info, go to http://www.246tNt.com/mpc52xx/
To compile/use :
@@ -37,12 +37,3 @@
- Of course, I inspired myself from the 2.4 port. If you think I forgot to
mention you/your company in the copyright of some code, I'll correct it
ASAP.
- - The codes wants the MBAR to be set at 0xf0000000 by the bootloader. It's
- mapped 1:1 with the MMU. If for whatever reason, you want to change
this,
- beware that some code depends on the 0xf0000000 address and other
depends
- on the 1:1 mapping.
- - Most of the code assumes that port multiplexing, frequency
selection, ...
- has already been done. IMHO this should be done as early as possible, in
- the bootloader. If for whatever reason you can't do it there, do it
in the
- platform setup code (if U-Boot) or in the arch/ppc/boot/simple/... (if
- DBug)
diff -Nru a/MAINTAINERS b/MAINTAINERS
--- a/MAINTAINERS 2004-09-14 12:48:06 +02:00
+++ b/MAINTAINERS 2004-09-14 12:48:06 +02:00
@@ -1301,6 +1301,14 @@
L: linuxppc-dev@lists.linuxppc.org
S: Maintained
+LINUX FOR POWERPC EMBEDDED MPC52XX
+P: Sylvain Munaut
+M: tnt@246tNt.com
+W: http://www.246tNt.com/mpc52xx/
+W: http://www.penguinppc.org/
+L: linuxppc-embedded@lists.linuxppc.org
+S: Maintained
+
LINUX FOR POWERPC EMBEDDED PPC4XX
P: Matt Porter
M: mporter@kernel.crashing.org
^ permalink raw reply [flat|nested] 11+ messages in thread* [PATCH 8/9] Small updates for Freescale MPC52xx
2004-09-14 11:38 [PATCH 0/9] Small updates for Freescale MPC52xx Sylvain Munaut
` (6 preceding siblings ...)
2004-09-14 12:00 ` [PATCH 7/9] " Sylvain Munaut
@ 2004-09-14 12:01 ` Sylvain Munaut
2004-09-14 12:02 ` [PATCH 9/9] " Sylvain Munaut
2004-09-15 20:46 ` [PATCH 10/9] Small updates for Freescale MPC52xx - Late one Sylvain Munaut
9 siblings, 0 replies; 11+ messages in thread
From: Sylvain Munaut @ 2004-09-14 12:01 UTC (permalink / raw)
Cc: Andrew Morton, Linux PPC Dev, Paul Mackerras, Linux Kernel
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/09/14 12:30:28+02:00 tnt@246tNt.com
# ppc: Allow the Freescale MPC52xx to NAP when idle on LITE5200 platform
#
# NAP allows some powersave. It's provided mainly as an example on how
to do it.
# However, when a BDI is plugged it causes early crashes so be aware !
#
# Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
#
# arch/ppc/platforms/lite5200.c
# 2004/09/14 12:30:11+02:00 tnt@246tNt.com +7 -0
# ppc: Allow the Freescale MPC52xx to NAP when idle on LITE5200 platform
#
diff -Nru a/arch/ppc/platforms/lite5200.c b/arch/ppc/platforms/lite5200.c
--- a/arch/ppc/platforms/lite5200.c 2004-09-14 12:48:13 +02:00
+++ b/arch/ppc/platforms/lite5200.c 2004-09-14 12:48:13 +02:00
@@ -36,6 +36,8 @@
#include <asm/mpc52xx.h>
+extern int powersave_nap;
+
/* Board data given by U-Boot */
bd_t __res;
EXPORT_SYMBOL(__res); /* For modules */
@@ -123,6 +125,11 @@
/* No ISA bus AFAIK */
isa_io_base = 0;
isa_mem_base = 0;
+
+ /* Powersave */
+#ifndef CONFIG_BDI_SWITCH /* NAP & BDI is a bad combination ... */
+ powersave_nap = 1; /* We allow this platform to NAP */
+#endif
/* Setup the ppc_md struct */
ppc_md.setup_arch = lite5200_setup_arch;
^ permalink raw reply [flat|nested] 11+ messages in thread* [PATCH 9/9] Small updates for Freescale MPC52xx
2004-09-14 11:38 [PATCH 0/9] Small updates for Freescale MPC52xx Sylvain Munaut
` (7 preceding siblings ...)
2004-09-14 12:01 ` [PATCH 8/9] " Sylvain Munaut
@ 2004-09-14 12:02 ` Sylvain Munaut
2004-09-15 20:46 ` [PATCH 10/9] Small updates for Freescale MPC52xx - Late one Sylvain Munaut
9 siblings, 0 replies; 11+ messages in thread
From: Sylvain Munaut @ 2004-09-14 12:02 UTC (permalink / raw)
Cc: Andrew Morton, Linux PPC Dev, Paul Mackerras, Linux Kernel
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/09/14 12:39:19+02:00 tnt@246tNt.com
# ppc: Add Freescale MPC52xx I2C Support using i2c-mpc.c
#
# Just adds the necessary OCP def entry.
#
# Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
#
# arch/ppc/platforms/mpc5200.c
# 2004/09/14 12:39:00+02:00 tnt@246tNt.com +24 -0
# ppc: Add Freescale MPC52xx I2C Support using i2c-mpc.c
#
diff -Nru a/arch/ppc/platforms/mpc5200.c b/arch/ppc/platforms/mpc5200.c
--- a/arch/ppc/platforms/mpc5200.c 2004-09-14 12:48:21 +02:00
+++ b/arch/ppc/platforms/mpc5200.c 2004-09-14 12:48:21 +02:00
@@ -16,6 +16,12 @@
#include <asm/ocp.h>
#include <asm/mpc52xx.h>
+
+struct ocp_fs_i2c_data mpc5200_i2c_def = {
+ .flags = FS_I2C_CLOCK_5200,
+};
+
+
/* Here is the core_ocp struct.
* With all the devices common to all board. Even if port multiplexing is
* not setup for them (if the user don't want them, just don't select the
@@ -23,6 +29,24 @@
* board specific file.
*/
struct ocp_def core_ocp[] = {
+ {
+ .vendor = OCP_VENDOR_FREESCALE,
+ .function = OCP_FUNC_IIC,
+ .index = 0,
+ .paddr = MPC52xx_I2C1,
+ .irq = OCP_IRQ_NA, /* MPC52xx_IRQ_I2C1 -
Buggy */
+ .pm = OCP_CPM_NA,
+ .additions = &mpc5200_i2c_def,
+ },
+ {
+ .vendor = OCP_VENDOR_FREESCALE,
+ .function = OCP_FUNC_IIC,
+ .index = 1,
+ .paddr = MPC52xx_I2C2,
+ .irq = OCP_IRQ_NA, /* MPC52xx_IRQ_I2C2 -
Buggy */
+ .pm = OCP_CPM_NA,
+ .additions = &mpc5200_i2c_def,
+ },
{ /* Terminating entry */
.vendor = OCP_VENDOR_INVALID
}
^ permalink raw reply [flat|nested] 11+ messages in thread* [PATCH 10/9] Small updates for Freescale MPC52xx - Late one ...
2004-09-14 11:38 [PATCH 0/9] Small updates for Freescale MPC52xx Sylvain Munaut
` (8 preceding siblings ...)
2004-09-14 12:02 ` [PATCH 9/9] " Sylvain Munaut
@ 2004-09-15 20:46 ` Sylvain Munaut
9 siblings, 0 replies; 11+ messages in thread
From: Sylvain Munaut @ 2004-09-15 20:46 UTC (permalink / raw)
Cc: Andrew Morton, Linux PPC Dev, Paul Mackerras, Linux Kernel
Hello
Sorry for this late one, I just got it and it belongs with the others.
I've added it to the bk tree I sent earlier (
bk://bkbits.246tNt.com/linux-2.5-mpc52xx-pending )
so please pull from that tree.
The unified diff along with the patch description is below.
Thanks,
Sylvain
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/09/15 22:03:38+02:00 tnt@246tNt.com
# ppc: Fix output of low-level serial debug on Freescale MPC52xx
#
# Thanks to Roger Blofeld for pointing that out.
#
# Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
#
# arch/ppc/syslib/mpc52xx_setup.c
# 2004/09/15 22:02:23+02:00 tnt@246tNt.com +14 -10
# ppc: Fix output of low-level serial debug on Freescale MPC52xx
#
diff -Nru a/arch/ppc/syslib/mpc52xx_setup.c
b/arch/ppc/syslib/mpc52xx_setup.c
--- a/arch/ppc/syslib/mpc52xx_setup.c 2004-09-15 22:36:07 +02:00
+++ b/arch/ppc/syslib/mpc52xx_setup.c 2004-09-15 22:36:07 +02:00
@@ -100,24 +100,28 @@
#error "mpc52xx PSC for console not selected"
#endif
+static void
+mpc52xx_psc_putc(struct mpc52xx_psc * psc, unsigned char c)
+{
+ while (!(in_be16(&psc->mpc52xx_psc_status) &
+ MPC52xx_PSC_SR_TXRDY));
+ out_8(&psc->mpc52xx_psc_buffer_8, c);
+}
+
void
mpc52xx_progress(char *s, unsigned short hex)
{
struct mpc52xx_psc *psc = (struct mpc52xx_psc *)MPC52xx_CONSOLE;
char c;
- /* Don't we need to disable serial interrupts ? */
-
while ((c = *s++) != 0) {
- if (c == '\n') {
- while (!(in_be16(&psc->mpc52xx_psc_status) &
- MPC52xx_PSC_SR_TXRDY)) ;
- out_8(&psc->mpc52xx_psc_buffer_8, '\r');
- }
- while (!(in_be16(&psc->mpc52xx_psc_status) &
- MPC52xx_PSC_SR_TXRDY)) ;
- out_8(&psc->mpc52xx_psc_buffer_8, c);
+ if (c == '\n')
+ mpc52xx_psc_putc(psc, '\r');
+ mpc52xx_psc_putc(psc, c);
}
+
+ mpc52xx_psc_putc(psc, '\r');
+ mpc52xx_psc_putc(psc, '\n');
}
#endif /* CONFIG_SERIAL_TEXT_DEBUG */
^ permalink raw reply [flat|nested] 11+ messages in thread