public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH 01/20] sandbox: Add architecture header files
Date: Sat, 17 Sep 2011 19:54:41 -0400	[thread overview]
Message-ID: <201109171954.42989.vapier@gentoo.org> (raw)
In-Reply-To: <1316278139-28635-2-git-send-email-sjg@chromium.org>

On Saturday, September 17, 2011 12:48:40 Simon Glass wrote:
> --- /dev/null
> +++ b/arch/sandbox/include/asm/arch-sandbox/clock.h
> 
> +enum periph_id {
> +	PERIPH_COUNT
> +};

is this needed by anything ?

> --- /dev/null
> +++ b/arch/sandbox/include/asm/arch-sandbox/gpio.h
>
> +enum {
> +	GPIO_COUNT	= 255,		/* Number of GPIOs */
> +};

are these needed for anything ?

> +int gpio_direction_input(int gp);
> +int gpio_direction_output(int gp, int value);
> +int gpio_get_value(int gp);
> +void gpio_set_value(int gp, int value);

let's use this new sandbox arch as an excuse to populate asm-generic/ further

> --- /dev/null
> +++ b/arch/sandbox/include/asm/posix_types.h
>
> +typedef struct {
> +#if defined(__KERNEL__) || defined(__USE_ALL)
> +	int	val[2];
> +#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */
> +	int	__val[2];
> +#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */
> +} __kernel_fsid_t;
> +
> +#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2)
> +
> +#undef	__FD_SET
> +#define __FD_SET(fd, fdsetp) \
> +		(((fd_set *)fdsetp)->fds_bits[fd >> 5] |= (1<<(fd & 31)))
> +
> +#undef	__FD_CLR
> +#define __FD_CLR(fd, fdsetp) \
> +		(((fd_set *)fdsetp)->fds_bits[fd >> 5] &= ~(1<<(fd & 31)))
> +
> +#undef	__FD_ISSET
> +#define __FD_ISSET(fd, fdsetp) \
> +		((((fd_set *)fdsetp)->fds_bits[fd >> 5] & (1<<(fd & 31))) != 0)
> +
> +#undef	__FD_ZERO
> +#define __FD_ZERO(fdsetp) \
> +		(memset(fdsetp, 0, sizeof(*(fd_set *)fdsetp)))

pretty sure u-boot doesnt use this, so just drop it

> --- /dev/null
> +++ b/arch/sandbox/include/asm/ptrace.h
>
> +/* This is not used in the sandbox architecture, but required by U-Boot */
> +struct pt_regs {
> +	long dummy;
> +};

does it actually need to have "dummy" ?

> --- /dev/null
> +++ b/arch/sandbox/include/asm/string.h

this file looks like it should simply include linux/string.h

> --- /dev/null
> +++ b/arch/sandbox/include/asm/u-boot-sandbox.h
>
> +/* cpu/.../cpu.c */
> +int	cpu_init(void);
> +int	cleanup_before_linux(void);
> +
> +/* cpu/.../arch/cpu.c */
> +int	arch_cpu_init(void);
> +int	arch_misc_init(void);
> +
> +/* board/.../... */
> +int	board_init(void);
> +int	dram_init(void);
> +void	dram_init_banksize(void);
> +
> +/* cpu/.../interrupt.c */
> +int	arch_interrupt_init(void);
> +void	reset_timer_masked(void);
> +ulong	get_timer_masked(void);
> +void	udelay_masked(unsigned long usec);

are these actually needed ?  or should these get punted ?

> +/* common/cmd_nvedit.c */
> +int	setenv(const char *, const char *);

this arch header shouldnt contain prototypes for non-arch stuff

> +/* cpu/.../timer.c */
> +int	timer_init(void);

already in common.h

> --- /dev/null
> +++ b/arch/sandbox/include/asm/unaligned.h

include asm-generic/unaligned.h rather than writing your own
-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/20110917/e78c09fb/attachment.pgp 

      parent reply	other threads:[~2011-09-17 23:54 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-17 16:48 [U-Boot] [RFC PATCH 01/20] sandbox: Add architecture header files Simon Glass
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 02/20] sandbox: Add architecture image support Simon Glass
2011-09-17 19:29   ` Marek Vasut
2011-09-18  3:57     ` Simon Glass
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 03/20] sandbox: Add compiler defines to support a 64-bit x86_64 platform Simon Glass
2011-09-17 23:56   ` Mike Frysinger
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 04/20] sandbox: Add cpu files Simon Glass
2011-09-17 23:58   ` Mike Frysinger
2011-09-23 15:54     ` Simon Glass
2011-09-25 19:25       ` Wolfgang Denk
2011-09-25 20:18         ` Simon Glass
2011-09-26  4:48           ` Mike Frysinger
2011-09-26 16:49             ` Simon Glass
2011-09-26 17:10               ` Anton Staaf
2011-09-26 19:11                 ` Simon Glass
2011-09-26 18:12             ` Wolfgang Denk
2011-09-26 18:16               ` Mike Frysinger
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 05/20] sandbox: Add architecture lib files Simon Glass
2011-09-18  0:02   ` Mike Frysinger
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 06/20] sandbox: Allow board_init_f() and board_init_r() to return Simon Glass
2011-09-18  0:05   ` Mike Frysinger
2011-09-23 15:55     ` Simon Glass
2011-09-25 19:55       ` Wolfgang Denk
2011-09-25 20:20         ` Simon Glass
2011-09-26  4:47       ` Mike Frysinger
2011-09-26 16:48         ` Simon Glass
2011-09-26 17:49           ` Anton Staaf
2011-09-26 19:22             ` Simon Glass
2011-09-26 19:25               ` Anton Staaf
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 07/20] sandbox: Add sandbox board Simon Glass
2011-09-18  0:17   ` Mike Frysinger
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 08/20] sandbox: Add board info for architecture Simon Glass
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 09/20] sandbox: Add bootm support Simon Glass
2011-09-18  0:16   ` Mike Frysinger
2011-09-23 15:55     ` Simon Glass
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 10/20] sandbox: Disable built-in malloc Simon Glass
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 11/20] sandbox: Disable standalone/API support Simon Glass
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 12/20] sandbox: Force command sections to be 4-byte aligned Simon Glass
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 13/20] sandbox: Add OS dependent layer Simon Glass
2011-09-18  0:20   ` Mike Frysinger
2011-09-23 15:59     ` Simon Glass
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 14/20] sandbox: Add board_init() Simon Glass
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 15/20] sandbox: Add main program Simon Glass
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 16/20] sandbox: Add serial uart Simon Glass
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 17/20] sandbox: Add basic config file Simon Glass
2011-09-18  0:22   ` Mike Frysinger
2011-09-23 16:00     ` Simon Glass
2011-09-26  4:52       ` Mike Frysinger
2011-09-26 18:18         ` Simon Glass
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 18/20] sandbox: Remove unused variable warnings Simon Glass
2011-09-18  0:25   ` Mike Frysinger
2011-09-23 16:01     ` Simon Glass
2011-09-26  4:49       ` Mike Frysinger
2011-09-26 18:07         ` Simon Glass
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 19/20] sandbox: Use uintptr_t for 32/64-bit compatibility Simon Glass
2011-09-17 16:48 ` [U-Boot] [RFC PATCH 20/20] sandbox: Makefile changes to build sandbox architecture Simon Glass
2011-09-17 23:54 ` Mike Frysinger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201109171954.42989.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox