Skip to content

Commit e28c861

Browse files
pistachio: marduk: Switch on heartbeat LED
Signed-off-by: Francois Berder <[email protected]>
1 parent fbd4249 commit e28c861

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

board/imgtec/pistachio_bub/mfio.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,3 +315,16 @@ void mfio_setup_usb_pwr(void)
315315
__raw_writel(val, USBPHYCONTROL0_ADDR);
316316
}
317317
#endif
318+
319+
#if defined(CONFIG_TARGET_PISTACHIO_MARDUK)
320+
/*
321+
* On Marduk, gpio 76 controls the heartbeat led.
322+
* This function configures it as an output and sets it to 1.
323+
*/
324+
void mfio_setup_led(void)
325+
{
326+
pistachio_configure_gpio(76, 1);
327+
328+
pistachio_set_gpio_output_state(76, 1);
329+
}
330+
#endif

board/imgtec/pistachio_bub/mfio.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,3 +185,7 @@ void mfio_setup_i2c(u8 interface);
185185
defined(CONFIG_TARGET_PISTACHIO_BEETLE)
186186
void mfio_setup_usb_pwr(void);
187187
#endif
188+
189+
#if defined(CONFIG_TARGET_PISTACHIO_MARDUK)
190+
void mfio_setup_led(void);
191+
#endif

board/imgtec/pistachio_bub/spl_pistachio.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ void spl_lowlevel_init(void) {
6565
*/
6666
setup_clk_gate_defaults();
6767

68+
#if defined(CONFIG_TARGET_PISTACHIO_MARDUK)
69+
/* Setup LED */
70+
mfio_setup_led();
71+
#endif
72+
6873
/* Setup SPIM1 MFIOs */
6974
mfio_setup_spim1();
7075

0 commit comments

Comments
 (0)