Skip to content

Commit 98e56a3

Browse files
change floating GPIO to outputs
1 parent 058e679 commit 98e56a3

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

board/freescale/ls1046ccx/ls1046ccx.c

+15
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0+
22
/*
33
* Copyright 2016 Freescale Semiconductor, Inc.
4+
* Updates Copyright 2020 CCX Technologies, Inc.
45
*/
56

67
#include <common.h>
@@ -37,6 +38,19 @@ int checkboard(void)
3738
return 0;
3839
}
3940

41+
void config_floating_gpio_as_outputs(void)
42+
{
43+
u32 val;
44+
struct ccsr_gpio *pgpio = (void *)(GPIO2_BASE_ADDR);
45+
46+
val = in_be32(&pgpio->gpdir);
47+
/* configure GPIO2 12-15 as outputs, NOTE bit endianess flip */
48+
val |= 0x00070000;
49+
out_be32(&pgpio->gpdir, val);
50+
51+
printf("GPIO Config: complete\n");
52+
}
53+
4054
int pld_enable_reset_req(void)
4155
{
4256
int err;
@@ -141,6 +155,7 @@ void config_board_mux(void)
141155
int misc_init_r(void)
142156
{
143157
config_board_mux();
158+
config_floating_gpio_as_outputs();
144159
return pld_enable_reset_req();
145160
}
146161
#endif

0 commit comments

Comments
 (0)