* [U-Boot] [PATCH] AP1000: Inline local 'get_device'
@ 2012-10-01 15:41 Tom Rini
2012-10-02 13:14 ` Stefan Roese
0 siblings, 1 reply; 4+ messages in thread
From: Tom Rini @ 2012-10-01 15:41 UTC (permalink / raw)
To: u-boot
The AP1000 defines a 'get_device' function to determine what board
revision we are on. Inline that checking as it conflicts with the
get_device() in <part.h> and is only used once.
Signed-off-by: Tom Rini <trini@ti.com>
---
board/amirix/ap1000/ap1000.c | 11 +++--------
board/amirix/ap1000/ap1000.h | 1 -
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/board/amirix/ap1000/ap1000.c b/board/amirix/ap1000/ap1000.c
index 64de04c..dbcb34b 100644
--- a/board/amirix/ap1000/ap1000.c
+++ b/board/amirix/ap1000/ap1000.c
@@ -43,11 +43,13 @@ int checkboard (void)
/* After a loadace command, the SystemAce control register is left in a wonky state. */
/* this code did not work in board_pre_init */
unsigned char *p = (unsigned char *) AP1000_SYSACE_REGBASE;
+ unsigned int *revision_reg_ptr = (unsigned int *) AP1xx_FPGA_REV_ADDR;
+ unsigned int device = (*revision_reg_ptr & AP1xx_TARGET_MASK);
p[SYSACE_CTRLREG0] = 0x0;
/* add platform and device to banner */
- switch (get_device ()) {
+ switch (device) {
case AP1xx_AP107_TARGET:
puts (AP1xx_AP107_TARGET_STR);
break;
@@ -160,13 +162,6 @@ unsigned int get_platform (void)
return (*revision_reg_ptr & AP1xx_PLATFORM_MASK);
}
-unsigned int get_device (void)
-{
- unsigned int *revision_reg_ptr = (unsigned int *) AP1xx_FPGA_REV_ADDR;
-
- return (*revision_reg_ptr & AP1xx_TARGET_MASK);
-}
-
#if 0 /* loadace is not working; it appears to be a hardware issue with the system ace. */
/*
This function loads FPGA configurations from the SystemACE CompactFlash
diff --git a/board/amirix/ap1000/ap1000.h b/board/amirix/ap1000/ap1000.h
index 118c4d1..d294816 100644
--- a/board/amirix/ap1000/ap1000.h
+++ b/board/amirix/ap1000/ap1000.h
@@ -164,7 +164,6 @@
void set_eat_machine_checks(int a_flag);
int get_eat_machine_checks(void);
unsigned int get_platform(void);
-unsigned int get_device(void);
void* memcpyb(void * dest,const void *src,size_t count);
int process_bootflag(ulong bootflag);
void user_led_on(void);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] AP1000: Inline local 'get_device'
2012-10-01 15:41 [U-Boot] [PATCH] AP1000: Inline local 'get_device' Tom Rini
@ 2012-10-02 13:14 ` Stefan Roese
2012-10-02 16:26 ` Tom Rini
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Roese @ 2012-10-02 13:14 UTC (permalink / raw)
To: u-boot
Hi Tom,
On 10/01/2012 05:41 PM, Tom Rini wrote:
> The AP1000 defines a 'get_device' function to determine what board
> revision we are on. Inline that checking as it conflicts with the
> get_device() in <part.h> and is only used once.
I plan to remove AP1000 board support completely. Board seems to be
unmaintained. I'll push the patch (and others) to "next" today and send
a pull request.
Thanks,
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] AP1000: Inline local 'get_device'
2012-10-02 13:14 ` Stefan Roese
@ 2012-10-02 16:26 ` Tom Rini
2012-10-03 0:13 ` Marek Vasut
0 siblings, 1 reply; 4+ messages in thread
From: Tom Rini @ 2012-10-02 16:26 UTC (permalink / raw)
To: u-boot
On Tue, Oct 02, 2012 at 03:14:30PM +0200, Stefan Roese wrote:
> Hi Tom,
>
> On 10/01/2012 05:41 PM, Tom Rini wrote:
> > The AP1000 defines a 'get_device' function to determine what board
> > revision we are on. Inline that checking as it conflicts with the
> > get_device() in <part.h> and is only used once.
>
> I plan to remove AP1000 board support completely. Board seems to be
> unmaintained. I'll push the patch (and others) to "next" today and send
> a pull request.
Works for me, thanks.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121002/d5889a25/attachment.pgp>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] AP1000: Inline local 'get_device'
2012-10-02 16:26 ` Tom Rini
@ 2012-10-03 0:13 ` Marek Vasut
0 siblings, 0 replies; 4+ messages in thread
From: Marek Vasut @ 2012-10-03 0:13 UTC (permalink / raw)
To: u-boot
Dear Tom Rini,
> On Tue, Oct 02, 2012 at 03:14:30PM +0200, Stefan Roese wrote:
> > Hi Tom,
> >
> > On 10/01/2012 05:41 PM, Tom Rini wrote:
> > > The AP1000 defines a 'get_device' function to determine what board
> > > revision we are on. Inline that checking as it conflicts with the
> > > get_device() in <part.h> and is only used once.
> >
> > I plan to remove AP1000 board support completely. Board seems to be
> > unmaintained. I'll push the patch (and others) to "next" today and send
> > a pull request.
>
> Works for me, thanks.
CC me on that pull RQ please so I know which bloody zombies get stopped :)
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-10-03 0:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-01 15:41 [U-Boot] [PATCH] AP1000: Inline local 'get_device' Tom Rini
2012-10-02 13:14 ` Stefan Roese
2012-10-02 16:26 ` Tom Rini
2012-10-03 0:13 ` Marek Vasut
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox