* [PATCH][1/4] move Cobalt PCI definitions to arch/mips/pci/fixup-cobalt.c
@ 2007-10-02 13:54 Yoichi Yuasa
2007-10-02 14:13 ` [PATCH][2/4] move Cobalt UART base definition to arch/mips/cobalt/console.c Yoichi Yuasa
0 siblings, 1 reply; 5+ messages in thread
From: Yoichi Yuasa @ 2007-10-02 13:54 UTC (permalink / raw)
To: Ralf Baechle; +Cc: yoichi_yuasa, linux-mips
Move Cobalt PCI definitions to arch/mips/pci/fixup-cobalt.c.
These PCI definitions are only used in arch/mips/pci/fixup-cobalt.c.
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
diff -pruN -X mips/Documentation/dontdiff mips-orig/arch/mips/pci/fixup-cobalt.c mips/arch/mips/pci/fixup-cobalt.c
--- mips-orig/arch/mips/pci/fixup-cobalt.c 2007-09-14 14:24:04.932503500 +0900
+++ mips/arch/mips/pci/fixup-cobalt.c 2007-09-14 14:25:01.604045250 +0900
@@ -20,6 +20,23 @@
#include <cobalt.h>
#include <irq.h>
+/*
+ * PCI slot numbers
+ */
+#define COBALT_PCICONF_CPU 0x06
+#define COBALT_PCICONF_ETH0 0x07
+#define COBALT_PCICONF_RAQSCSI 0x08
+#define COBALT_PCICONF_VIA 0x09
+#define COBALT_PCICONF_PCISLOT 0x0A
+#define COBALT_PCICONF_ETH1 0x0C
+
+/*
+ * The Cobalt board ID information. The boards have an ID number wired
+ * into the VIA that is available in the high nibble of register 94.
+ */
+#define VIA_COBALT_BRD_ID_REG 0x94
+#define VIA_COBALT_BRD_REG_to_ID(reg) ((unsigned char)(reg) >> 4)
+
static void qube_raq_galileo_early_fixup(struct pci_dev *dev)
{
if (dev->devfn == PCI_DEVFN(0, 0) &&
diff -pruN -X mips/Documentation/dontdiff mips-orig/include/asm-mips/mach-cobalt/cobalt.h mips/include/asm-mips/mach-cobalt/cobalt.h
--- mips-orig/include/asm-mips/mach-cobalt/cobalt.h 2007-09-14 14:24:04.952504750 +0900
+++ mips/include/asm-mips/mach-cobalt/cobalt.h 2007-09-14 14:21:49.180019500 +0900
@@ -13,37 +13,15 @@
#define __ASM_COBALT_H
/*
- * PCI configuration space manifest constants. These are wired into
- * the board layout according to the PCI spec to enable the software
- * to probe the hardware configuration space in a well defined manner.
- *
- * The PCI_DEVSHFT() macro transforms these values into numbers
- * suitable for passing as the dev parameter to the various
- * pcibios_read/write_config routines.
+ * The Cobalt board ID information.
*/
-#define COBALT_PCICONF_CPU 0x06
-#define COBALT_PCICONF_ETH0 0x07
-#define COBALT_PCICONF_RAQSCSI 0x08
-#define COBALT_PCICONF_VIA 0x09
-#define COBALT_PCICONF_PCISLOT 0x0A
-#define COBALT_PCICONF_ETH1 0x0C
-
+extern int cobalt_board_id;
-/*
- * The Cobalt board id information. The boards have an ID number wired
- * into the VIA that is available in the high nibble of register 94.
- * This register is available in the VIA configuration space through the
- * interface routines qube_pcibios_read/write_config. See cobalt/pci.c
- */
-#define VIA_COBALT_BRD_ID_REG 0x94
-#define VIA_COBALT_BRD_REG_to_ID(reg) ((unsigned char) (reg) >> 4)
#define COBALT_BRD_ID_QUBE1 0x3
#define COBALT_BRD_ID_RAQ1 0x4
#define COBALT_BRD_ID_QUBE2 0x5
#define COBALT_BRD_ID_RAQ2 0x6
-extern int cobalt_board_id;
-
#define COBALT_LED_PORT (*(volatile unsigned char *) CKSEG1ADDR(0x1c000000))
# define COBALT_LED_BAR_LEFT (1 << 0) /* Qube */
# define COBALT_LED_BAR_RIGHT (1 << 1) /* Qube */
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH][2/4] move Cobalt UART base definition to arch/mips/cobalt/console.c
2007-10-02 13:54 [PATCH][1/4] move Cobalt PCI definitions to arch/mips/pci/fixup-cobalt.c Yoichi Yuasa
@ 2007-10-02 14:13 ` Yoichi Yuasa
2007-10-02 14:17 ` [PATCH][3/4] move Cobalt reset port definition to arch/mips/cobalt/reset.c Yoichi Yuasa
2007-10-02 20:14 ` [PATCH][2/4] move Cobalt UART base definition to arch/mips/cobalt/console.c Ralf Baechle
0 siblings, 2 replies; 5+ messages in thread
From: Yoichi Yuasa @ 2007-10-02 14:13 UTC (permalink / raw)
To: Ralf Baechle; +Cc: yoichi_yuasa, linux-mips
Move Cobalt UART base definition to arch/mips/cobalt/console.c.
It's only used in arch/mips/cobalt/console.c.
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
diff -pruN -X mips/Documentation/dontdiff mips-orig/arch/mips/cobalt/console.c mips/arch/mips/cobalt/console.c
--- mips-orig/arch/mips/cobalt/console.c 2007-09-30 21:21:39.610319250 +0900
+++ mips/arch/mips/cobalt/console.c 2007-09-30 21:26:10.135226000 +0900
@@ -1,16 +1,15 @@
/*
* (C) P. Horton 2006
*/
+#include <linux/io.h>
#include <linux/serial_reg.h>
-#include <asm/addrspace.h>
-
-#include <cobalt.h>
+#define UART_BASE ((void __iomem *)CKSEG1ADDR(0x1c800000))
void prom_putchar(char c)
{
- while(!(COBALT_UART[UART_LSR] & UART_LSR_THRE))
+ while(!(readb(UART_BASE + UART_LSR) & UART_LSR_THRE))
;
- COBALT_UART[UART_TX] = c;
+ writeb(c, UART_BASE + UART_TX);
}
diff -pruN -X mips/Documentation/dontdiff mips-orig/include/asm-mips/mach-cobalt/cobalt.h mips/include/asm-mips/mach-cobalt/cobalt.h
--- mips-orig/include/asm-mips/mach-cobalt/cobalt.h 2007-09-30 21:25:01.586942000 +0900
+++ mips/include/asm-mips/mach-cobalt/cobalt.h 2007-09-30 21:21:46.170729250 +0900
@@ -39,6 +39,4 @@ extern int cobalt_board_id;
# define COBALT_KEY_SELECT (1 << 7)
# define COBALT_KEY_MASK 0xfe
-#define COBALT_UART ((volatile unsigned char *) CKSEG1ADDR(0x1c800000))
-
#endif /* __ASM_COBALT_H */
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH][3/4] move Cobalt reset port definition to arch/mips/cobalt/reset.c
2007-10-02 14:13 ` [PATCH][2/4] move Cobalt UART base definition to arch/mips/cobalt/console.c Yoichi Yuasa
@ 2007-10-02 14:17 ` Yoichi Yuasa
2007-10-02 14:21 ` [PATCH][4/4] remove cobalt_machine_power_off() Yoichi Yuasa
2007-10-02 20:14 ` [PATCH][2/4] move Cobalt UART base definition to arch/mips/cobalt/console.c Ralf Baechle
1 sibling, 1 reply; 5+ messages in thread
From: Yoichi Yuasa @ 2007-10-02 14:17 UTC (permalink / raw)
To: Ralf Baechle; +Cc: yoichi_yuasa, linux-mips
Move Cobalt reset port definition to arch/mips/cobalt/reset.c.
It's only used in arch/mips/cobalt/reset.c.
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
diff -pruN -X mips/Documentation/dontdiff mips-orig/arch/mips/cobalt/reset.c mips/arch/mips/cobalt/reset.c
--- mips-orig/arch/mips/cobalt/reset.c 2007-09-30 21:09:22.860275250 +0900
+++ mips/arch/mips/cobalt/reset.c 2007-09-30 21:13:17.078913000 +0900
@@ -9,11 +9,15 @@
* Copyright (C) 2001 by Liam Davies (ldavies@agile.tv)
*/
#include <linux/init.h>
+#include <linux/io.h>
#include <linux/jiffies.h>
#include <linux/leds.h>
#include <cobalt.h>
+#define RESET_PORT ((void __iomem *)CKSEG1ADDR(0x1c000000))
+#define RESET 0x0f
+
DEFINE_LED_TRIGGER(power_off_led_trigger);
static int __init ledtrig_power_off_init(void)
@@ -43,7 +47,7 @@ void cobalt_machine_halt(void)
last ^= diff;
if((diff & (COBALT_KEY_ENTER | COBALT_KEY_SELECT)) && !(~last & (COBALT_KEY_ENTER | COBALT_KEY_SELECT)))
- COBALT_LED_PORT = COBALT_LED_RESET;
+ writeb(RESET, RESET_PORT);
for (mark = jiffies; jiffies - mark < HZ;)
;
@@ -52,7 +56,7 @@ void cobalt_machine_halt(void)
void cobalt_machine_restart(char *command)
{
- COBALT_LED_PORT = COBALT_LED_RESET;
+ writeb(RESET, RESET_PORT);
/* we should never get here */
cobalt_machine_halt();
diff -pruN -X mips/Documentation/dontdiff mips-orig/include/asm-mips/mach-cobalt/cobalt.h mips/include/asm-mips/mach-cobalt/cobalt.h
--- mips-orig/include/asm-mips/mach-cobalt/cobalt.h 2007-09-30 21:10:04.230860750 +0900
+++ mips/include/asm-mips/mach-cobalt/cobalt.h 2007-09-30 21:11:01.626447750 +0900
@@ -22,13 +22,6 @@ extern int cobalt_board_id;
#define COBALT_BRD_ID_QUBE2 0x5
#define COBALT_BRD_ID_RAQ2 0x6
-#define COBALT_LED_PORT (*(volatile unsigned char *) CKSEG1ADDR(0x1c000000))
-# define COBALT_LED_BAR_LEFT (1 << 0) /* Qube */
-# define COBALT_LED_BAR_RIGHT (1 << 1) /* Qube */
-# define COBALT_LED_WEB (1 << 2) /* RaQ */
-# define COBALT_LED_POWER_OFF (1 << 3) /* RaQ */
-# define COBALT_LED_RESET 0x0f
-
#define COBALT_KEY_PORT ((~*(volatile unsigned int *) CKSEG1ADDR(0x1d000000) >> 24) & COBALT_KEY_MASK)
# define COBALT_KEY_CLEAR (1 << 1)
# define COBALT_KEY_LEFT (1 << 2)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH][4/4] remove cobalt_machine_power_off()
2007-10-02 14:17 ` [PATCH][3/4] move Cobalt reset port definition to arch/mips/cobalt/reset.c Yoichi Yuasa
@ 2007-10-02 14:21 ` Yoichi Yuasa
0 siblings, 0 replies; 5+ messages in thread
From: Yoichi Yuasa @ 2007-10-02 14:21 UTC (permalink / raw)
To: Ralf Baechle; +Cc: yoichi_yuasa, linux-mips
Remove cobalt_machine_power_off().
It's same as cobalt_machine_halt().
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
diff -pruN -X mips/Documentation/dontdiff mips-orig/arch/mips/cobalt/reset.c mips/arch/mips/cobalt/reset.c
--- mips-orig/arch/mips/cobalt/reset.c 2007-10-01 17:52:43.870115250 +0900
+++ mips/arch/mips/cobalt/reset.c 2007-10-01 17:52:51.622599750 +0900
@@ -61,12 +61,3 @@ void cobalt_machine_restart(char *comman
/* we should never get here */
cobalt_machine_halt();
}
-
-/*
- * This triggers the luser mode device driver for the power switch ;-)
- */
-void cobalt_machine_power_off(void)
-{
- printk("You can switch the machine off now.\n");
- cobalt_machine_halt();
-}
diff -pruN -X mips/Documentation/dontdiff mips-orig/arch/mips/cobalt/setup.c mips/arch/mips/cobalt/setup.c
--- mips-orig/arch/mips/cobalt/setup.c 2007-10-01 17:03:49.370720500 +0900
+++ mips/arch/mips/cobalt/setup.c 2007-10-01 17:52:51.634600500 +0900
@@ -25,7 +25,6 @@
extern void cobalt_machine_restart(char *command);
extern void cobalt_machine_halt(void);
-extern void cobalt_machine_power_off(void);
const char *get_system_type(void)
{
@@ -96,7 +95,7 @@ void __init plat_mem_setup(void)
_machine_restart = cobalt_machine_restart;
_machine_halt = cobalt_machine_halt;
- pm_power_off = cobalt_machine_power_off;
+ pm_power_off = cobalt_machine_halt;
set_io_port_base(CKSEG1ADDR(GT_DEF_PCI0_IO_BASE));
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][2/4] move Cobalt UART base definition to arch/mips/cobalt/console.c
2007-10-02 14:13 ` [PATCH][2/4] move Cobalt UART base definition to arch/mips/cobalt/console.c Yoichi Yuasa
2007-10-02 14:17 ` [PATCH][3/4] move Cobalt reset port definition to arch/mips/cobalt/reset.c Yoichi Yuasa
@ 2007-10-02 20:14 ` Ralf Baechle
1 sibling, 0 replies; 5+ messages in thread
From: Ralf Baechle @ 2007-10-02 20:14 UTC (permalink / raw)
To: Yoichi Yuasa; +Cc: linux-mips
On Tue, Oct 02, 2007 at 11:13:17PM +0900, Yoichi Yuasa wrote:
> diff -pruN -X mips/Documentation/dontdiff mips-orig/arch/mips/cobalt/console.c mips/arch/mips/cobalt/console.c
> --- mips-orig/arch/mips/cobalt/console.c 2007-09-30 21:21:39.610319250 +0900
> +++ mips/arch/mips/cobalt/console.c 2007-09-30 21:26:10.135226000 +0900
> @@ -1,16 +1,15 @@
> /*
> * (C) P. Horton 2006
> */
> +#include <linux/io.h>
> #include <linux/serial_reg.h>
>
> -#include <asm/addrspace.h>
> -
> -#include <cobalt.h>
> +#define UART_BASE ((void __iomem *)CKSEG1ADDR(0x1c800000))
>
> void prom_putchar(char c)
> {
> - while(!(COBALT_UART[UART_LSR] & UART_LSR_THRE))
> + while(!(readb(UART_BASE + UART_LSR) & UART_LSR_THRE))
^^^
missing space.
Aside of that looks ok, so I fixed that up and queued all four patches
for 2.6.24.
Thanks,
Ralf
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-10-02 20:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-02 13:54 [PATCH][1/4] move Cobalt PCI definitions to arch/mips/pci/fixup-cobalt.c Yoichi Yuasa
2007-10-02 14:13 ` [PATCH][2/4] move Cobalt UART base definition to arch/mips/cobalt/console.c Yoichi Yuasa
2007-10-02 14:17 ` [PATCH][3/4] move Cobalt reset port definition to arch/mips/cobalt/reset.c Yoichi Yuasa
2007-10-02 14:21 ` [PATCH][4/4] remove cobalt_machine_power_off() Yoichi Yuasa
2007-10-02 20:14 ` [PATCH][2/4] move Cobalt UART base definition to arch/mips/cobalt/console.c Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox