diff mbox

[U-Boot,RFC,v2,03/13] sandbox: Support iotrace feature

Message ID 1399656509-28082-4-git-send-email-sjg@chromium.org
State RFC
Delegated to: Tom Rini
Headers show

Commit Message

Simon Glass May 9, 2014, 5:28 p.m. UTC
Support the iotrace feature for sandbox, and enable it, using some dummy
I/O access methods.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v3: None
Changes in v2:
- Add a new patch to enable iotrace for sandbox

 arch/sandbox/include/asm/io.h | 10 ++++++++++
 include/configs/sandbox.h     |  3 +++
 2 files changed, 13 insertions(+)

Comments

Rommel G Custodio May 13, 2014, 4:46 a.m. UTC | #1
Dear Simon Glass,

Simon Glass <sjg <at> chromium.org> writes:

> 
> Support the iotrace feature for sandbox, and enable it, using some dummy
> I/O access methods.
> 
> Signed-off-by: Simon Glass <sjg <at> chromium.org>
> ---

<snipped>

> 
> diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
> index fa62cb6..8ca2a55 100644
> --- a/include/configs/sandbox.h
> +++ b/include/configs/sandbox.h
>  <at>  <at>  -16,6 +16,9  <at>  <at> 
> 
>  #endif
> 
> +#define CONFIG_IO_TRACE
> +#define CONFIG_CMD_IO_TRACE
> +

s/CONFIG_CMD_IO_TRACE/CONFIG_CMD_IOTRACE/g

The common/Makefile shows CONFIG_CMD_IOTRACE triggers creation of 
cmd_iotrace.o.

All the best,
Rommel
Simon Glass May 24, 2014, 1:43 a.m. UTC | #2
Hi Rommel,

On 12 May 2014 18:46, Rommel G Custodio <sessyargc+u-boot@gmail.com> wrote:
> Dear Simon Glass,
>
> Simon Glass <sjg <at> chromium.org> writes:
>
>>
>> Support the iotrace feature for sandbox, and enable it, using some dummy
>> I/O access methods.
>>
>> Signed-off-by: Simon Glass <sjg <at> chromium.org>
>> ---
>
> <snipped>
>
>>
>> diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
>> index fa62cb6..8ca2a55 100644
>> --- a/include/configs/sandbox.h
>> +++ b/include/configs/sandbox.h
>>  <at>  <at>  -16,6 +16,9  <at>  <at>
>>
>>  #endif
>>
>> +#define CONFIG_IO_TRACE
>> +#define CONFIG_CMD_IO_TRACE
>> +
>
> s/CONFIG_CMD_IO_TRACE/CONFIG_CMD_IOTRACE/g

Thanks - I didn't actually see your email - it's a good idea to keep
the author in cc.

Regards,
Simon
diff mbox

Patch

diff --git a/arch/sandbox/include/asm/io.h b/arch/sandbox/include/asm/io.h
index 7956041..895fcb8 100644
--- a/arch/sandbox/include/asm/io.h
+++ b/arch/sandbox/include/asm/io.h
@@ -40,4 +40,14 @@  static inline void unmap_sysmem(const void *vaddr)
 /* Map from a pointer to our RAM buffer */
 phys_addr_t map_to_sysmem(const void *ptr);
 
+/* Define nops for sandbox I/O access */
+#define readb(addr) 0
+#define readw(addr) 0
+#define readl(addr) 0
+#define writeb(v, addr)
+#define writew(v, addr)
+#define writel(v, addr)
+
+#include <iotrace.h>
+
 #endif
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index fa62cb6..8ca2a55 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -16,6 +16,9 @@ 
 
 #endif
 
+#define CONFIG_IO_TRACE
+#define CONFIG_CMD_IO_TRACE
+
 #define CONFIG_SYS_TIMER_RATE		1000000
 
 #define CONFIG_BOOTSTAGE