* [U-Boot] Microblaze changes
@ 2011-08-31 8:35 Michal Simek
2011-08-31 8:35 ` [U-Boot] [PATCH 01/10] microblaze: Fix in/out_be8/16/32 functions Michal Simek
0 siblings, 1 reply; 20+ messages in thread
From: Michal Simek @ 2011-08-31 8:35 UTC (permalink / raw)
To: u-boot
Hi,
I am sending some Microblaze changes.
Thanks for your comments,
Michal
^ permalink raw reply [flat|nested] 20+ messages in thread
* [U-Boot] [PATCH 01/10] microblaze: Fix in/out_be8/16/32 functions
2011-08-31 8:35 [U-Boot] Microblaze changes Michal Simek
@ 2011-08-31 8:35 ` Michal Simek
2011-08-31 8:35 ` [U-Boot] [PATCH 02/10] microblaze: Support CTRL+C when tftp is running Michal Simek
2011-09-07 20:59 ` [U-Boot] [PATCH 01/10] microblaze: Fix in/out_be8/16/32 functions Wolfgang Denk
0 siblings, 2 replies; 20+ messages in thread
From: Michal Simek @ 2011-08-31 8:35 UTC (permalink / raw)
To: u-boot
Use inline functions instead of macros because
of typechecking.
Signed-off-by: Michal Simek <monstr@monstr.eu>
---
arch/microblaze/include/asm/io.h | 33 +++++++++++++++++++++++++++------
1 files changed, 27 insertions(+), 6 deletions(-)
diff --git a/arch/microblaze/include/asm/io.h b/arch/microblaze/include/asm/io.h
index 7e190d1..a35700e 100644
--- a/arch/microblaze/include/asm/io.h
+++ b/arch/microblaze/include/asm/io.h
@@ -46,14 +46,35 @@
#define outl(x, addr) ((void) writel (x, addr))
/* Some #definitions to keep strange Xilinx code happy */
-#define in_8(addr) readb (addr)
-#define in_be16(addr) readw (addr)
-#define in_be32(addr) readl (addr)
+extern inline int in_8(volatile unsigned char *addr)
+{
+ return readb(addr);
+}
+
+extern inline int in_be16(volatile unsigned short *addr)
+{
+ return readw(addr);
+}
-#define out_8(addr,x ) outb (x,addr)
-#define out_be16(addr,x ) outw (x,addr)
-#define out_be32(addr,x ) outl (x,addr)
+extern inline int in_be32(volatile unsigned int *addr)
+{
+ return readl(addr);
+}
+extern inline void out_8(volatile unsigned char *addr, char val)
+{
+ outb (val, addr);
+}
+
+extern inline void out_be16(volatile unsigned short *addr, short val)
+{
+ outw (val, addr);
+}
+
+extern inline void out_be32(volatile unsigned int *addr, int val)
+{
+ outl (val, addr);
+}
#define inb_p(port) inb((port))
#define outb_p(val, port) outb((val), (port))
--
1.5.5.6
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [U-Boot] [PATCH 02/10] microblaze: Support CTRL+C when tftp is running
2011-08-31 8:35 ` [U-Boot] [PATCH 01/10] microblaze: Fix in/out_be8/16/32 functions Michal Simek
@ 2011-08-31 8:35 ` Michal Simek
2011-08-31 8:35 ` [U-Boot] [PATCH 03/10] microblaze: Support flashes on lower addresses Michal Simek
2011-09-07 20:59 ` [U-Boot] [PATCH 01/10] microblaze: Fix in/out_be8/16/32 functions Wolfgang Denk
1 sibling, 1 reply; 20+ messages in thread
From: Michal Simek @ 2011-08-31 8:35 UTC (permalink / raw)
To: u-boot
Signed-off-by: Michal Simek <monstr@monstr.eu>
---
arch/microblaze/lib/board.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c
index d97543b..5510c12 100644
--- a/arch/microblaze/lib/board.c
+++ b/arch/microblaze/lib/board.c
@@ -68,6 +68,7 @@ typedef int (init_fnc_t) (void);
init_fnc_t *init_sequence[] = {
env_init,
serial_init,
+ console_init_f,
#ifdef CONFIG_SYS_GPIO_0
gpio_init,
#endif
--
1.5.5.6
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [U-Boot] [PATCH 03/10] microblaze: Support flashes on lower addresses
2011-08-31 8:35 ` [U-Boot] [PATCH 02/10] microblaze: Support CTRL+C when tftp is running Michal Simek
@ 2011-08-31 8:35 ` Michal Simek
2011-08-31 8:35 ` [U-Boot] [PATCH 04/10] microblaze: Add netconsole support Michal Simek
` (2 more replies)
0 siblings, 3 replies; 20+ messages in thread
From: Michal Simek @ 2011-08-31 8:35 UTC (permalink / raw)
To: u-boot
Signed-off-by: Michal Simek <monstr@monstr.eu>
---
arch/microblaze/lib/board.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c
index 5510c12..ab1cbab 100644
--- a/arch/microblaze/lib/board.c
+++ b/arch/microblaze/lib/board.c
@@ -84,6 +84,10 @@ init_fnc_t *init_sequence[] = {
NULL,
};
+unsigned long monitor_flash_len;
+extern char *__end;
+extern char *__text_start;
+
void board_init (void)
{
bd_t *bd;
@@ -105,6 +109,8 @@ void board_init (void)
bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
gd->flags |= GD_FLG_RELOC; /* tell others: relocation done */
+ monitor_flash_len = __end - __text_start;
+
/*
* The Malloc area is immediately below the monitor copy in DRAM
* aka CONFIG_SYS_MONITOR_BASE - Note there is no need for reloc_off
--
1.5.5.6
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [U-Boot] [PATCH 04/10] microblaze: Add netconsole support
2011-08-31 8:35 ` [U-Boot] [PATCH 03/10] microblaze: Support flashes on lower addresses Michal Simek
@ 2011-08-31 8:35 ` Michal Simek
2011-08-31 8:35 ` [U-Boot] [PATCH 05/10] microblaze: Fix unaligned.h for endians Michal Simek
` (2 more replies)
2011-08-31 19:18 ` [U-Boot] [PATCH 03/10] microblaze: Support flashes on lower addresses Mike Frysinger
2011-09-07 21:01 ` Wolfgang Denk
2 siblings, 3 replies; 20+ messages in thread
From: Michal Simek @ 2011-08-31 8:35 UTC (permalink / raw)
To: u-boot
Signed-off-by: Michal Simek <monstr@monstr.eu>
---
arch/microblaze/lib/board.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c
index ab1cbab..e8f4c5b 100644
--- a/arch/microblaze/lib/board.c
+++ b/arch/microblaze/lib/board.c
@@ -167,6 +167,12 @@ void board_init (void)
/* Initialize stdio devices */
stdio_init ();
+ /* Initialize the jump table for applications */
+ jumptable_init ();
+
+ /* Initialize the console (after the relocation and devices init) */
+ console_init_r ();
+
if ((s = getenv ("loadaddr")) != NULL) {
load_addr = simple_strtoul (s, NULL, 16);
}
--
1.5.5.6
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [U-Boot] [PATCH 05/10] microblaze: Fix unaligned.h for endians
2011-08-31 8:35 ` [U-Boot] [PATCH 04/10] microblaze: Add netconsole support Michal Simek
@ 2011-08-31 8:35 ` Michal Simek
2011-08-31 8:35 ` [U-Boot] [PATCH 06/10] microblaze: Copy bootfile from variables Michal Simek
2011-08-31 19:20 ` [U-Boot] [PATCH 05/10] microblaze: Fix unaligned.h for endians Mike Frysinger
2011-08-31 19:19 ` [U-Boot] [PATCH 04/10] microblaze: Add netconsole support Mike Frysinger
2011-09-07 21:02 ` Wolfgang Denk
2 siblings, 2 replies; 20+ messages in thread
From: Michal Simek @ 2011-08-31 8:35 UTC (permalink / raw)
To: u-boot
Based on ARM unaligned.h.
Signed-off-by: Michal Simek <monstr@monstr.eu>
---
arch/microblaze/include/asm/unaligned.h | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/arch/microblaze/include/asm/unaligned.h b/arch/microblaze/include/asm/unaligned.h
index 785c2e9..faf1b02 100644
--- a/arch/microblaze/include/asm/unaligned.h
+++ b/arch/microblaze/include/asm/unaligned.h
@@ -1,16 +1,16 @@
#ifndef _ASM_MICROBLAZE_UNALIGNED_H
#define _ASM_MICROBLAZE_UNALIGNED_H
-#ifdef __KERNEL__
-
-/*
- * The Microblaze can do unaligned accesses itself in big endian mode.
- */
-#include <linux/unaligned/access_ok.h>
+#include <linux/unaligned/le_byteshift.h>
+#include <linux/unaligned/be_byteshift.h>
#include <linux/unaligned/generic.h>
-#define get_unaligned __get_unaligned_be
-#define put_unaligned __put_unaligned_be
+#ifdef __MICROBLAZEEL__
+# define get_unaligned __get_unaligned_le
+# define put_unaligned __put_unaligned_le
+#else
+# define get_unaligned __get_unaligned_be
+# define put_unaligned __put_unaligned_be
+#endif
-#endif /* __KERNEL__ */
#endif /* _ASM_MICROBLAZE_UNALIGNED_H */
--
1.5.5.6
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [U-Boot] [PATCH 06/10] microblaze: Copy bootfile from variables
2011-08-31 8:35 ` [U-Boot] [PATCH 05/10] microblaze: Fix unaligned.h for endians Michal Simek
@ 2011-08-31 8:35 ` Michal Simek
2011-08-31 8:35 ` [U-Boot] [PATCH 07/10] microblaze: Remove debug saving value Michal Simek
2011-08-31 19:20 ` [U-Boot] [PATCH 05/10] microblaze: Fix unaligned.h for endians Mike Frysinger
1 sibling, 1 reply; 20+ messages in thread
From: Michal Simek @ 2011-08-31 8:35 UTC (permalink / raw)
To: u-boot
Setup bootfile.
Signed-off-by: Michal Simek <monstr@monstr.eu>
---
arch/microblaze/lib/board.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c
index e8f4c5b..c00d96b 100644
--- a/arch/microblaze/lib/board.c
+++ b/arch/microblaze/lib/board.c
@@ -187,6 +187,10 @@ void board_init (void)
uchar enetaddr[6];
eth_getenv_enetaddr("ethaddr", enetaddr);
printf("MAC: %pM\n", enetaddr);
+
+ if ((s = getenv ("bootfile")) != NULL) {
+ copy_filename (BootFile, s, sizeof (BootFile));
+ }
#endif
/* main_loop */
--
1.5.5.6
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [U-Boot] [PATCH 07/10] microblaze: Remove debug saving value
2011-08-31 8:35 ` [U-Boot] [PATCH 06/10] microblaze: Copy bootfile from variables Michal Simek
@ 2011-08-31 8:35 ` Michal Simek
2011-08-31 8:35 ` [U-Boot] [PATCH 08/10] microblaze: Setup MB vectors if feature is enable for u-boot Michal Simek
0 siblings, 1 reply; 20+ messages in thread
From: Michal Simek @ 2011-08-31 8:35 UTC (permalink / raw)
To: u-boot
Forget to remove debug code.
Signed-off-by: Michal Simek <monstr@monstr.eu>
---
arch/microblaze/cpu/start.S | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/arch/microblaze/cpu/start.S b/arch/microblaze/cpu/start.S
index 93a9efd..d3370c4 100644
--- a/arch/microblaze/cpu/start.S
+++ b/arch/microblaze/cpu/start.S
@@ -46,8 +46,6 @@ _start:
addik r6, r0, 0x2 /* BIG/LITTLE endian offset */
swi r6, r0, 0
lbui r10, r0, 0
- swi r6, r0, 0x40
- swi r10, r0, 0x50
/* add opcode instruction for 32bit jump - 2 instruction imm & brai*/
addi r6, r0, 0xb0000000 /* hex b000 opcode imm */
--
1.5.5.6
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [U-Boot] [PATCH 08/10] microblaze: Setup MB vectors if feature is enable for u-boot
2011-08-31 8:35 ` [U-Boot] [PATCH 07/10] microblaze: Remove debug saving value Michal Simek
@ 2011-08-31 8:35 ` Michal Simek
2011-08-31 8:35 ` [U-Boot] [PATCH 09/10] microblaze: Save and restore first unused vector Michal Simek
0 siblings, 1 reply; 20+ messages in thread
From: Michal Simek @ 2011-08-31 8:35 UTC (permalink / raw)
To: u-boot
For example: Setup reset vectors if reset address is setup.
Setup user exception vector if user exception is enabled
Signed-off-by: Michal Simek <monstr@monstr.eu>
---
arch/microblaze/cpu/start.S | 33 +++++++++++++++++++++------------
1 files changed, 21 insertions(+), 12 deletions(-)
diff --git a/arch/microblaze/cpu/start.S b/arch/microblaze/cpu/start.S
index d3370c4..34b07d8 100644
--- a/arch/microblaze/cpu/start.S
+++ b/arch/microblaze/cpu/start.S
@@ -30,6 +30,12 @@
.text
.global _start
_start:
+ /* reserve registers:
+ * r10: Stores little/big endian offset for vectors
+ * r2: Stores imm opcode
+ * r3: Stores brai opcode
+ */
+
mts rmsr, r0 /* disable cache */
addi r1, r0, CONFIG_SYS_INIT_SP_OFFSET
addi r1, r1, -4 /* Decrement SP to top of memory */
@@ -47,21 +53,15 @@ _start:
swi r6, r0, 0
lbui r10, r0, 0
- /* add opcode instruction for 32bit jump - 2 instruction imm & brai*/
- addi r6, r0, 0xb0000000 /* hex b000 opcode imm */
- swi r6, r0, 0x0 /* reset address */
- swi r6, r0, 0x8 /* user vector exception */
- swi r6, r0, 0x10 /* interrupt */
- swi r6, r0, 0x20 /* hardware exception */
-
- addi r6, r0, 0xb8080000 /* hew b808 opcode brai*/
- swi r6, r0, 0x4 /* reset address */
- swi r6, r0, 0xC /* user vector exception */
- swi r6, r0, 0x14 /* interrupt */
- swi r6, r0, 0x24 /* hardware exception */
+ /* add opcode instruction for 32bit jump - 2 instruction imm & brai */
+ addi r2, r0, 0xb0000000 /* hex b000 opcode imm */
+ addi r3, r0, 0xb8080000 /* hew b808 opcode brai */
#ifdef CONFIG_SYS_RESET_ADDRESS
/* reset address */
+ swi r2, r0, 0x0 /* reset address - imm opcode */
+ swi r3, r0, 0x4 /* reset address - brai opcode */
+
addik r6, r0, CONFIG_SYS_RESET_ADDRESS
sw r6, r1, r0
lhu r7, r1, r0
@@ -88,6 +88,9 @@ _start:
#ifdef CONFIG_SYS_USR_EXCEP
/* user_vector_exception */
+ swi r2, r0, 0x8 /* user vector exception - imm opcode */
+ swi r3, r0, 0xC /* user vector exception - brai opcode */
+
addik r6, r0, _exception_handler
sw r6, r1, r0
/*
@@ -119,6 +122,9 @@ _start:
#ifdef CONFIG_SYS_INTC_0
/* interrupt_handler */
+ swi r2, r0, 0x10 /* interrupt - imm opcode */
+ swi r3, r0, 0x14 /* interrupt - brai opcode */
+
addik r6, r0, _interrupt_handler
sw r6, r1, r0
lhu r7, r1, r10
@@ -129,6 +135,9 @@ _start:
#endif
/* hardware exception */
+ swi r2, r0, 0x20 /* hardware exception - imm opcode */
+ swi r3, r0, 0x24 /* hardware exception - brai opcode */
+
addik r6, r0, _hw_exception_handler
sw r6, r1, r0
lhu r7, r1, r10
--
1.5.5.6
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [U-Boot] [PATCH 09/10] microblaze: Save and restore first unused vector
2011-08-31 8:35 ` [U-Boot] [PATCH 08/10] microblaze: Setup MB vectors if feature is enable for u-boot Michal Simek
@ 2011-08-31 8:35 ` Michal Simek
2011-08-31 8:35 ` [U-Boot] [PATCH 10/10] microblaze: Clean up reset asm code Michal Simek
0 siblings, 1 reply; 20+ messages in thread
From: Michal Simek @ 2011-08-31 8:35 UTC (permalink / raw)
To: u-boot
Use one memory space to detect little/big endian platforms.
The first unused address(0x28) is used instead 0x0 address (reset vectors).
Detection rewrited reset vector setup from first stage bootloader.
Workflow:
1. Store 0x28 to r7
2. Do little/big endian test
3. Restore r7 to 0x28
Signed-off-by: Michal Simek <monstr@monstr.eu>
---
arch/microblaze/cpu/start.S | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/microblaze/cpu/start.S b/arch/microblaze/cpu/start.S
index 34b07d8..97dd757 100644
--- a/arch/microblaze/cpu/start.S
+++ b/arch/microblaze/cpu/start.S
@@ -50,8 +50,10 @@ _start:
* 4b) BIG endian - r10 contains 0x0 because 0x2 offset is on addr 0x3
*/
addik r6, r0, 0x2 /* BIG/LITTLE endian offset */
- swi r6, r0, 0
- lbui r10, r0, 0
+ lwi r7, r0, 0x28
+ swi r6, r0, 0x28 /* used first unused MB vector */
+ lbui r10, r0, 0x28 /* used first unused MB vector */
+ swi r7, r0, 0x28
/* add opcode instruction for 32bit jump - 2 instruction imm & brai */
addi r2, r0, 0xb0000000 /* hex b000 opcode imm */
--
1.5.5.6
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [U-Boot] [PATCH 10/10] microblaze: Clean up reset asm code
2011-08-31 8:35 ` [U-Boot] [PATCH 09/10] microblaze: Save and restore first unused vector Michal Simek
@ 2011-08-31 8:35 ` Michal Simek
0 siblings, 0 replies; 20+ messages in thread
From: Michal Simek @ 2011-08-31 8:35 UTC (permalink / raw)
To: u-boot
- Remove code copying
- Reset address is setup from first stage bootloader
- Support reset vector setup on little endian
Signed-off-by: Michal Simek <monstr@monstr.eu>
---
arch/microblaze/cpu/start.S | 25 +++++--------------------
1 files changed, 5 insertions(+), 20 deletions(-)
diff --git a/arch/microblaze/cpu/start.S b/arch/microblaze/cpu/start.S
index 97dd757..492ad93 100644
--- a/arch/microblaze/cpu/start.S
+++ b/arch/microblaze/cpu/start.S
@@ -66,26 +66,11 @@ _start:
addik r6, r0, CONFIG_SYS_RESET_ADDRESS
sw r6, r1, r0
- lhu r7, r1, r0
- shi r7, r0, 0x2
- shi r6, r0, 0x6
-/*
- * Copy U-Boot code to CONFIG_SYS_TEXT_BASE
- * solve problem with sbrk_base
- */
-#if (CONFIG_SYS_RESET_ADDRESS != CONFIG_SYS_TEXT_BASE)
- addi r4, r0, __end
- addi r5, r0, __text_start
- rsub r4, r5, r4 /* size = __end - __text_start */
- addi r6, r0, CONFIG_SYS_RESET_ADDRESS /* source address */
- addi r7, r0, 0 /* counter */
-4:
- lw r8, r6, r7
- sw r8, r5, r7
- addi r7, r7, 0x4
- cmp r8, r4, r7
- blti r8, 4b
-#endif
+ lhu r7, r1, r10
+ rsubi r8, r10, 0x2
+ sh r7, r0, r8
+ rsubi r8, r10, 0x6
+ sh r6, r0, r8
#endif
#ifdef CONFIG_SYS_USR_EXCEP
--
1.5.5.6
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [U-Boot] [PATCH 03/10] microblaze: Support flashes on lower addresses
2011-08-31 8:35 ` [U-Boot] [PATCH 03/10] microblaze: Support flashes on lower addresses Michal Simek
2011-08-31 8:35 ` [U-Boot] [PATCH 04/10] microblaze: Add netconsole support Michal Simek
@ 2011-08-31 19:18 ` Mike Frysinger
2011-09-01 12:55 ` Michal Simek
2011-09-07 21:01 ` Wolfgang Denk
2 siblings, 1 reply; 20+ messages in thread
From: Mike Frysinger @ 2011-08-31 19:18 UTC (permalink / raw)
To: u-boot
On Wednesday, August 31, 2011 04:35:14 Michal Simek wrote:
> +extern char *__end;
> +extern char *__text_start;
if you're referring to symbols provided by a linker script, you should do:
extern char __end[];
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110831/a2b56309/attachment.pgp
^ permalink raw reply [flat|nested] 20+ messages in thread
* [U-Boot] [PATCH 04/10] microblaze: Add netconsole support
2011-08-31 8:35 ` [U-Boot] [PATCH 04/10] microblaze: Add netconsole support Michal Simek
2011-08-31 8:35 ` [U-Boot] [PATCH 05/10] microblaze: Fix unaligned.h for endians Michal Simek
@ 2011-08-31 19:19 ` Mike Frysinger
2011-09-01 13:04 ` Michal Simek
2011-09-07 21:02 ` Wolfgang Denk
2 siblings, 1 reply; 20+ messages in thread
From: Mike Frysinger @ 2011-08-31 19:19 UTC (permalink / raw)
To: u-boot
On Wednesday, August 31, 2011 04:35:15 Michal Simek wrote:
> --- a/arch/microblaze/lib/board.c
> +++ b/arch/microblaze/lib/board.c
> @@ -167,6 +167,12 @@ void board_init (void)
> /* Initialize stdio devices */
> stdio_init ();
>
> + /* Initialize the jump table for applications */
> + jumptable_init ();
> +
> + /* Initialize the console (after the relocation and devices init) */
> + console_init_r ();
> +
> if ((s = getenv ("loadaddr")) != NULL) {
> load_addr = simple_strtoul (s, NULL, 16);
> }
your summary doesnt seem to match what you're changing. the two things you're
doing here should always be done regardless of netconsole.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110831/b019c7e2/attachment.pgp
^ permalink raw reply [flat|nested] 20+ messages in thread
* [U-Boot] [PATCH 05/10] microblaze: Fix unaligned.h for endians
2011-08-31 8:35 ` [U-Boot] [PATCH 05/10] microblaze: Fix unaligned.h for endians Michal Simek
2011-08-31 8:35 ` [U-Boot] [PATCH 06/10] microblaze: Copy bootfile from variables Michal Simek
@ 2011-08-31 19:20 ` Mike Frysinger
2011-09-01 12:51 ` Michal Simek
1 sibling, 1 reply; 20+ messages in thread
From: Mike Frysinger @ 2011-08-31 19:20 UTC (permalink / raw)
To: u-boot
On Wednesday, August 31, 2011 04:35:16 Michal Simek wrote:
> Based on ARM unaligned.h.
can't you just include asm-generic/unaligned.h ? the ARM peeps are just being
lazy at this point :P.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110831/4b9d5fea/attachment.pgp
^ permalink raw reply [flat|nested] 20+ messages in thread
* [U-Boot] [PATCH 05/10] microblaze: Fix unaligned.h for endians
2011-08-31 19:20 ` [U-Boot] [PATCH 05/10] microblaze: Fix unaligned.h for endians Mike Frysinger
@ 2011-09-01 12:51 ` Michal Simek
0 siblings, 0 replies; 20+ messages in thread
From: Michal Simek @ 2011-09-01 12:51 UTC (permalink / raw)
To: u-boot
Mike Frysinger wrote:
> On Wednesday, August 31, 2011 04:35:16 Michal Simek wrote:
>> Based on ARM unaligned.h.
>
> can't you just include asm-generic/unaligned.h ? the ARM peeps are just being
> lazy at this point :P.
Can.
Thanks,
Michal
--
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian
^ permalink raw reply [flat|nested] 20+ messages in thread
* [U-Boot] [PATCH 03/10] microblaze: Support flashes on lower addresses
2011-08-31 19:18 ` [U-Boot] [PATCH 03/10] microblaze: Support flashes on lower addresses Mike Frysinger
@ 2011-09-01 12:55 ` Michal Simek
0 siblings, 0 replies; 20+ messages in thread
From: Michal Simek @ 2011-09-01 12:55 UTC (permalink / raw)
To: u-boot
Mike Frysinger wrote:
> On Wednesday, August 31, 2011 04:35:14 Michal Simek wrote:
>> +extern char *__end;
>> +extern char *__text_start;
>
> if you're referring to symbols provided by a linker script, you should do:
> extern char __end[];
fixed.
Thanks,
Michal
--
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian
^ permalink raw reply [flat|nested] 20+ messages in thread
* [U-Boot] [PATCH 04/10] microblaze: Add netconsole support
2011-08-31 19:19 ` [U-Boot] [PATCH 04/10] microblaze: Add netconsole support Mike Frysinger
@ 2011-09-01 13:04 ` Michal Simek
0 siblings, 0 replies; 20+ messages in thread
From: Michal Simek @ 2011-09-01 13:04 UTC (permalink / raw)
To: u-boot
Mike Frysinger wrote:
> On Wednesday, August 31, 2011 04:35:15 Michal Simek wrote:
>> --- a/arch/microblaze/lib/board.c
>> +++ b/arch/microblaze/lib/board.c
>> @@ -167,6 +167,12 @@ void board_init (void)
>> /* Initialize stdio devices */
>> stdio_init ();
>>
>> + /* Initialize the jump table for applications */
>> + jumptable_init ();
>> +
>> + /* Initialize the console (after the relocation and devices init) */
>> + console_init_r ();
>> +
>> if ((s = getenv ("loadaddr")) != NULL) {
>> load_addr = simple_strtoul (s, NULL, 16);
>> }
>
> your summary doesnt seem to match what you're changing. the two things you're
> doing here should always be done regardless of netconsole.
It is really old patch where the point was to get netconsole work.
It is just initialize jumptable and setup correct console.
Fixed.
Thanks,
Michal
--
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian
^ permalink raw reply [flat|nested] 20+ messages in thread
* [U-Boot] [PATCH 01/10] microblaze: Fix in/out_be8/16/32 functions
2011-08-31 8:35 ` [U-Boot] [PATCH 01/10] microblaze: Fix in/out_be8/16/32 functions Michal Simek
2011-08-31 8:35 ` [U-Boot] [PATCH 02/10] microblaze: Support CTRL+C when tftp is running Michal Simek
@ 2011-09-07 20:59 ` Wolfgang Denk
1 sibling, 0 replies; 20+ messages in thread
From: Wolfgang Denk @ 2011-09-07 20:59 UTC (permalink / raw)
To: u-boot
Dear Michal Simek,
In message <1314779721-1113-2-git-send-email-monstr@monstr.eu> you wrote:
> Use inline functions instead of macros because
> of typechecking.
I don't understand the rationale of this change.
> -#define in_8(addr) readb (addr)
> -#define in_be16(addr) readw (addr)
> -#define in_be32(addr) readl (addr)
> +extern inline int in_8(volatile unsigned char *addr)
> +{
> + return readb(addr);
> +}
What;s the difference wether the type checking occurs for the in_8()
call or for the readb() call?
> +extern inline int in_be16(volatile unsigned short *addr)
Also, checkpatch says:
WARNING: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt
#106: FILE: arch/microblaze/include/asm/io.h:49:
+extern inline int in_8(volatile unsigned char *addr)
WARNING: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt
#111: FILE: arch/microblaze/include/asm/io.h:54:
+extern inline int in_be16(volatile unsigned short *addr)
WARNING: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt
#119: FILE: arch/microblaze/include/asm/io.h:59:
+extern inline int in_be32(volatile unsigned int *addr)
WARNING: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt
#124: FILE: arch/microblaze/include/asm/io.h:64:
+extern inline void out_8(volatile unsigned char *addr, char val)
WARNING: space prohibited between function name and open parenthesis '('
#126: FILE: arch/microblaze/include/asm/io.h:66:
+ outb (val, addr);
WARNING: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt
#129: FILE: arch/microblaze/include/asm/io.h:69:
+extern inline void out_be16(volatile unsigned short *addr, short val)
WARNING: space prohibited between function name and open parenthesis '('
#131: FILE: arch/microblaze/include/asm/io.h:71:
+ outw (val, addr);
WARNING: Use of volatile is usually wrong: see Documentation/volatile-considered-harmful.txt
#134: FILE: arch/microblaze/include/asm/io.h:74:
+extern inline void out_be32(volatile unsigned int *addr, int val)
WARNING: space prohibited between function name and open parenthesis '('
#136: FILE: arch/microblaze/include/asm/io.h:76:
+ outl (val, addr);
total: 0 errors, 9 warnings, 41 lines checked
Please fix.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I believe you find life such a problem because you think there are
the good people and the bad people. You're wrong, of course. There
are, always and only, the bad people, but some of them are on oppo-
site sides. - Terry Pratchett, _Guards! Guards!_
^ permalink raw reply [flat|nested] 20+ messages in thread
* [U-Boot] [PATCH 03/10] microblaze: Support flashes on lower addresses
2011-08-31 8:35 ` [U-Boot] [PATCH 03/10] microblaze: Support flashes on lower addresses Michal Simek
2011-08-31 8:35 ` [U-Boot] [PATCH 04/10] microblaze: Add netconsole support Michal Simek
2011-08-31 19:18 ` [U-Boot] [PATCH 03/10] microblaze: Support flashes on lower addresses Mike Frysinger
@ 2011-09-07 21:01 ` Wolfgang Denk
2 siblings, 0 replies; 20+ messages in thread
From: Wolfgang Denk @ 2011-09-07 21:01 UTC (permalink / raw)
To: u-boot
Dear Michal Simek,
In message <1314779721-1113-4-git-send-email-monstr@monstr.eu> you wrote:
> Signed-off-by: Michal Simek <monstr@monstr.eu>
> ---
> arch/microblaze/lib/board.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c
> index 5510c12..ab1cbab 100644
> --- a/arch/microblaze/lib/board.c
> +++ b/arch/microblaze/lib/board.c
> @@ -84,6 +84,10 @@ init_fnc_t *init_sequence[] = {
> NULL,
> };
>
> +unsigned long monitor_flash_len;
> +extern char *__end;
> +extern char *__text_start;
WARNING: externs should be avoided in .c files
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Q: Why do PCs have a reset button on the front?
A: Because they are expected to run Microsoft operating systems.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [U-Boot] [PATCH 04/10] microblaze: Add netconsole support
2011-08-31 8:35 ` [U-Boot] [PATCH 04/10] microblaze: Add netconsole support Michal Simek
2011-08-31 8:35 ` [U-Boot] [PATCH 05/10] microblaze: Fix unaligned.h for endians Michal Simek
2011-08-31 19:19 ` [U-Boot] [PATCH 04/10] microblaze: Add netconsole support Mike Frysinger
@ 2011-09-07 21:02 ` Wolfgang Denk
2 siblings, 0 replies; 20+ messages in thread
From: Wolfgang Denk @ 2011-09-07 21:02 UTC (permalink / raw)
To: u-boot
Dear Michal Simek,
In message <1314779721-1113-5-git-send-email-monstr@monstr.eu> you wrote:
> Signed-off-by: Michal Simek <monstr@monstr.eu>
> ---
> arch/microblaze/lib/board.c | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c
> index ab1cbab..e8f4c5b 100644
> --- a/arch/microblaze/lib/board.c
> +++ b/arch/microblaze/lib/board.c
> @@ -167,6 +167,12 @@ void board_init (void)
> /* Initialize stdio devices */
> stdio_init ();
>
> + /* Initialize the jump table for applications */
> + jumptable_init ();
> +
> + /* Initialize the console (after the relocation and devices init) */
> + console_init_r ();
2 x WARNING: space prohibited between function name and open
parenthesis '('
Stop review here. Will you please run your patches through ckeckpatch
_before_ submitting? Thanks.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The IQ of the group is the lowest IQ of a member of the group divided
by the number of people in the group.
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2011-09-07 21:02 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-31 8:35 [U-Boot] Microblaze changes Michal Simek
2011-08-31 8:35 ` [U-Boot] [PATCH 01/10] microblaze: Fix in/out_be8/16/32 functions Michal Simek
2011-08-31 8:35 ` [U-Boot] [PATCH 02/10] microblaze: Support CTRL+C when tftp is running Michal Simek
2011-08-31 8:35 ` [U-Boot] [PATCH 03/10] microblaze: Support flashes on lower addresses Michal Simek
2011-08-31 8:35 ` [U-Boot] [PATCH 04/10] microblaze: Add netconsole support Michal Simek
2011-08-31 8:35 ` [U-Boot] [PATCH 05/10] microblaze: Fix unaligned.h for endians Michal Simek
2011-08-31 8:35 ` [U-Boot] [PATCH 06/10] microblaze: Copy bootfile from variables Michal Simek
2011-08-31 8:35 ` [U-Boot] [PATCH 07/10] microblaze: Remove debug saving value Michal Simek
2011-08-31 8:35 ` [U-Boot] [PATCH 08/10] microblaze: Setup MB vectors if feature is enable for u-boot Michal Simek
2011-08-31 8:35 ` [U-Boot] [PATCH 09/10] microblaze: Save and restore first unused vector Michal Simek
2011-08-31 8:35 ` [U-Boot] [PATCH 10/10] microblaze: Clean up reset asm code Michal Simek
2011-08-31 19:20 ` [U-Boot] [PATCH 05/10] microblaze: Fix unaligned.h for endians Mike Frysinger
2011-09-01 12:51 ` Michal Simek
2011-08-31 19:19 ` [U-Boot] [PATCH 04/10] microblaze: Add netconsole support Mike Frysinger
2011-09-01 13:04 ` Michal Simek
2011-09-07 21:02 ` Wolfgang Denk
2011-08-31 19:18 ` [U-Boot] [PATCH 03/10] microblaze: Support flashes on lower addresses Mike Frysinger
2011-09-01 12:55 ` Michal Simek
2011-09-07 21:01 ` Wolfgang Denk
2011-09-07 20:59 ` [U-Boot] [PATCH 01/10] microblaze: Fix in/out_be8/16/32 functions Wolfgang Denk
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.