* [PATCH 1/3] Uartlite: Flush RX fifo in bootwrapper
2007-09-30 21:46 [PATCH 0/3] Bug fixes to Virtex support in arch/ppc Grant Likely
@ 2007-09-30 21:46 ` Grant Likely
2007-09-30 21:47 ` [PATCH 2/3] XilinxFB: Move xilinxfb_platform_data definition to a shared header file Grant Likely
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Grant Likely @ 2007-09-30 21:46 UTC (permalink / raw)
To: linuxppc-dev, jwboyer
From: Grant Likely <grant.likely@secretlab.ca>
Flush the uartlite RX fifo so that characters typed before entry into
the zImage wrapper do not muck up the kernel command line.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/ppc/boot/simple/misc-embedded.c | 4 +++-
arch/ppc/boot/simple/uartlite_tty.c | 8 ++++++++
2 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/arch/ppc/boot/simple/misc-embedded.c b/arch/ppc/boot/simple/misc-embedded.c
index 8a08ad3..d5a00eb 100644
--- a/arch/ppc/boot/simple/misc-embedded.c
+++ b/arch/ppc/boot/simple/misc-embedded.c
@@ -89,7 +89,9 @@ load_kernel(unsigned long load_addr, int num_words, unsigned long cksum, bd_t *b
* initialize the serial console port.
*/
embed_config(&bp);
-#if defined(CONFIG_SERIAL_CPM_CONSOLE) || defined(CONFIG_SERIAL_8250_CONSOLE)
+#if defined(CONFIG_SERIAL_CPM_CONSOLE) || \
+ defined(CONFIG_SERIAL_8250_CONSOLE) || \
+ defined(CONFIG_SERIAL_UARTLITE_CONSOLE)
com_port = serial_init(0, bp);
#endif
diff --git a/arch/ppc/boot/simple/uartlite_tty.c b/arch/ppc/boot/simple/uartlite_tty.c
index 0eae1ea..ca1743e 100644
--- a/arch/ppc/boot/simple/uartlite_tty.c
+++ b/arch/ppc/boot/simple/uartlite_tty.c
@@ -16,6 +16,14 @@
#define UARTLITE_BASEADDR ((void*)(XPAR_UARTLITE_0_BASEADDR))
+unsigned long
+serial_init(int chan, void *ignored)
+{
+ /* Clear the RX FIFO */
+ out_be32(UARTLITE_BASEADDR + 0x0C, 0x2);
+ return 0;
+}
+
void
serial_putc(unsigned long com_port, unsigned char c)
{
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] XilinxFB: Move xilinxfb_platform_data definition to a shared header file
2007-09-30 21:46 [PATCH 0/3] Bug fixes to Virtex support in arch/ppc Grant Likely
2007-09-30 21:46 ` [PATCH 1/3] Uartlite: Flush RX fifo in bootwrapper Grant Likely
@ 2007-09-30 21:47 ` Grant Likely
2007-09-30 21:47 ` [PATCH 3/3] Setup default eth addr in embed_config for Xilinx Virtex platforms Grant Likely
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Grant Likely @ 2007-09-30 21:47 UTC (permalink / raw)
To: linuxppc-dev, jwboyer
From: Grant Likely <grant.likely@secretlab.ca>
XilnixFB can be used by more than just arch/ppc. Move the data structure
definition into include/linux/xilinxfb.h so it can be used by microblaze
and arch/powerpc
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/ppc/syslib/virtex_devices.h | 8 +-------
drivers/video/xilinxfb.c | 2 +-
include/linux/xilinxfb.h | 23 +++++++++++++++++++++++
3 files changed, 25 insertions(+), 8 deletions(-)
diff --git a/arch/ppc/syslib/virtex_devices.h b/arch/ppc/syslib/virtex_devices.h
index 9f38d92..6ebd9b4 100644
--- a/arch/ppc/syslib/virtex_devices.h
+++ b/arch/ppc/syslib/virtex_devices.h
@@ -12,13 +12,7 @@
#define __ASM_VIRTEX_DEVICES_H__
#include <linux/platform_device.h>
-
-/* ML300/403 reference design framebuffer driver platform data struct */
-struct xilinxfb_platform_data {
- u32 rotate_screen;
- u32 screen_height_mm;
- u32 screen_width_mm;
-};
+#include <linux/xilinxfb.h>
void __init virtex_early_serial_map(void);
diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c
index 6ef9733..4bc67ab 100644
--- a/drivers/video/xilinxfb.c
+++ b/drivers/video/xilinxfb.c
@@ -30,7 +30,7 @@
#include <linux/platform_device.h>
#include <asm/io.h>
-#include <syslib/virtex_devices.h>
+#include <linux/xilinxfb.h>
#define DRIVER_NAME "xilinxfb"
#define DRIVER_DESCRIPTION "Xilinx TFT LCD frame buffer driver"
diff --git a/include/linux/xilinxfb.h b/include/linux/xilinxfb.h
new file mode 100644
index 0000000..9ad984d
--- /dev/null
+++ b/include/linux/xilinxfb.h
@@ -0,0 +1,23 @@
+/*
+ * Platform device data for Xilinx Framebuffer device
+ *
+ * Copyright 2007 Secret Lab Technologies Ltd.
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2. This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ */
+
+#ifndef __XILINXFB_H__
+#define __XILINXFB_H__
+
+#include <linux/types.h>
+
+/* ML300/403 reference design framebuffer driver platform data struct */
+struct xilinxfb_platform_data {
+ u32 rotate_screen;
+ u32 screen_height_mm;
+ u32 screen_width_mm;
+};
+
+#endif /* __XILINXFB_H__ */
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] Setup default eth addr in embed_config for Xilinx Virtex platforms
2007-09-30 21:46 [PATCH 0/3] Bug fixes to Virtex support in arch/ppc Grant Likely
2007-09-30 21:46 ` [PATCH 1/3] Uartlite: Flush RX fifo in bootwrapper Grant Likely
2007-09-30 21:47 ` [PATCH 2/3] XilinxFB: Move xilinxfb_platform_data definition to a shared header file Grant Likely
@ 2007-09-30 21:47 ` Grant Likely
2007-09-30 21:55 ` [PATCH 0/3] Bug fixes to Virtex support in arch/ppc Grant Likely
2007-10-01 1:49 ` Josh Boyer
4 siblings, 0 replies; 6+ messages in thread
From: Grant Likely @ 2007-09-30 21:47 UTC (permalink / raw)
To: linuxppc-dev, jwboyer
From: Grant Likely <grant.likely@secretlab.ca>
This simply adds the boilerplate default Ethernet address to embed_config
for the Xilinx platform (bug fix).
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
arch/ppc/boot/simple/embed_config.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/arch/ppc/boot/simple/embed_config.c b/arch/ppc/boot/simple/embed_config.c
index 840bff2..3b46792 100644
--- a/arch/ppc/boot/simple/embed_config.c
+++ b/arch/ppc/boot/simple/embed_config.c
@@ -752,7 +752,9 @@ embed_config(bd_t ** bdp)
static const unsigned long congruence_classes = 256;
unsigned long addr;
unsigned long dccr;
+ uint8_t* cp;
bd_t *bd;
+ int i;
/*
* Invalidate the data cache if the data cache is turned off.
@@ -778,6 +780,12 @@ embed_config(bd_t ** bdp)
bd->bi_intfreq = XPAR_CORE_CLOCK_FREQ_HZ;
bd->bi_busfreq = XPAR_PLB_CLOCK_FREQ_HZ;
bd->bi_pci_busfreq = XPAR_PCI_0_CLOCK_FREQ_HZ;
+
+ /* Copy the default ethernet address */
+ cp = (u_char *)def_enet_addr;
+ for (i=0; i<6; i++)
+ bd->bi_enetaddr[i] = *cp++;
+
timebase_period_ns = 1000000000 / bd->bi_tbfreq;
/* see bi_tbfreq definition in arch/ppc/platforms/4xx/xilinx_ml300.h */
}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 0/3] Bug fixes to Virtex support in arch/ppc
2007-09-30 21:46 [PATCH 0/3] Bug fixes to Virtex support in arch/ppc Grant Likely
` (2 preceding siblings ...)
2007-09-30 21:47 ` [PATCH 3/3] Setup default eth addr in embed_config for Xilinx Virtex platforms Grant Likely
@ 2007-09-30 21:55 ` Grant Likely
2007-10-01 1:49 ` Josh Boyer
4 siblings, 0 replies; 6+ messages in thread
From: Grant Likely @ 2007-09-30 21:55 UTC (permalink / raw)
To: linuxppc-dev, jwboyer
On 9/30/07, Grant Likely <grant.likely@secretlab.ca> wrote:
> Josh,
>
> Here are some small bug fixes to arch/ppc. They are all pretty trivial,
> and I think they should go in for 2.6.24. If there are no problems with
> them, can you please merge them into your tree and ask paulus to pull
> them?
I've also pushed these changes to my git tree:
The following changes since commit c4d5e375470862fd741f93bf0686d7ac2f7fdce4:
David Gibson (1):
[POWERPC] Cleanups for physmap_of.c (v2)
are available in the git repository at:
git://git.secretlab.ca/git/linux-2.6-virtex.git virtex-for-2.6.24
Grant Likely (3):
[POWERPC] Uartlite: Flush RX fifo in bootwrapper
[POWERPC] XilinxFB: Move xilinxfb_platform_data to a shared header file
[POWERPC] Setup default eth addr in embed_config for Xilinx
Virtex platforms
arch/ppc/boot/simple/embed_config.c | 8 ++++++++
arch/ppc/boot/simple/misc-embedded.c | 4 +++-
arch/ppc/boot/simple/uartlite_tty.c | 8 ++++++++
arch/ppc/syslib/virtex_devices.h | 8 +-------
drivers/video/xilinxfb.c | 2 +-
include/linux/xilinxfb.h | 23 +++++++++++++++++++++++
6 files changed, 44 insertions(+), 9 deletions(-)
create mode 100644 include/linux/xilinxfb.h
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/3] Bug fixes to Virtex support in arch/ppc
2007-09-30 21:46 [PATCH 0/3] Bug fixes to Virtex support in arch/ppc Grant Likely
` (3 preceding siblings ...)
2007-09-30 21:55 ` [PATCH 0/3] Bug fixes to Virtex support in arch/ppc Grant Likely
@ 2007-10-01 1:49 ` Josh Boyer
4 siblings, 0 replies; 6+ messages in thread
From: Josh Boyer @ 2007-10-01 1:49 UTC (permalink / raw)
To: Grant Likely; +Cc: linuxppc-dev
On Sun, 2007-09-30 at 15:46 -0600, Grant Likely wrote:
> Josh,
>
> Here are some small bug fixes to arch/ppc. They are all pretty trivial,
> and I think they should go in for 2.6.24. If there are no problems with
> them, can you please merge them into your tree and ask paulus to pull
> them?
Yep. These all seem truly bug-fix and sane. I'll pull them into my
tree tomorrow.
josh
^ permalink raw reply [flat|nested] 6+ messages in thread