summaryrefslogtreecommitdiff
path: root/board/olio
diff options
context:
space:
mode:
Diffstat (limited to 'board/olio')
-rw-r--r--board/olio/h1/Makefile1
-rw-r--r--board/olio/h1/h1.c31
-rw-r--r--board/olio/h1/led.c73
3 files changed, 7 insertions, 98 deletions
diff --git a/board/olio/h1/Makefile b/board/olio/h1/Makefile
index 3018f6c63..9d360712c 100644
--- a/board/olio/h1/Makefile
+++ b/board/olio/h1/Makefile
@@ -10,7 +10,6 @@ include $(TOPDIR)/config.mk
LIB = $(obj)lib$(BOARD).o
COBJS-y := $(BOARD).o
-COBJS-$(CONFIG_STATUS_LED) += led.o
COBJS := $(sort $(COBJS-y))
SRCS := $(COBJS:.o=.c)
diff --git a/board/olio/h1/h1.c b/board/olio/h1/h1.c
index be5d43064..defdf01e4 100644
--- a/board/olio/h1/h1.c
+++ b/board/olio/h1/h1.c
@@ -24,6 +24,7 @@
#include <asm/errno.h>
#include "h1.h"
#include <command.h>
+#include <power/tps65910.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -60,19 +61,11 @@ void get_board_mem_timings(struct board_sdrc_timings *timings)
identify_nand_chip(&pop_mfr, &pop_id);
timings->mr = MICRON_V_MR_165;
- if (pop_mfr == 0) {
- /* 256MB DDR */
- timings->mcfg = MICRON_V_MCFG_200(256 << 20);
- timings->ctrla = MICRON_V_ACTIMA_200;
- timings->ctrlb = MICRON_V_ACTIMB_200;
- timings->rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_200MHz;
- } else {
- /* Assume 128MB and Micron/165MHz timings to be safe */
- timings->mcfg = MICRON_V_MCFG_165(128 << 20);
- timings->ctrla = MICRON_V_ACTIMA_165;
- timings->ctrlb = MICRON_V_ACTIMB_165;
- timings->rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_165MHz;
- }
+ /* 128MB DDR */
+ timings->mcfg = MICRON_V_MCFG_200(128 << 20);
+ timings->ctrla = MICRON_V_ACTIMA_200;
+ timings->ctrlb = MICRON_V_ACTIMB_200;
+ timings->rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_200MHz;
}
#endif
@@ -89,18 +82,8 @@ int misc_init_r(void)
/* Enable i2c2 pullup resisters */
writel(~(PRG_I2C2_PULLUPRESX), &prog_io_base->io1);
printf("Olio H1\n");
- MUX_BEAGLE_XM();
-
- /* Set GPIO states before they are made outputs */
- writel(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1,
- &gpio6_base->setdataout);
- writel(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 |
- GPIO15 | GPIO14 | GPIO13 | GPIO12, &gpio5_base->setdataout);
- /* Configure GPIOs to output */
- writel(~(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1), &gpio6_base->oe);
- writel(~(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 |
- GPIO15 | GPIO14 | GPIO13 | GPIO12), &gpio5_base->oe);
+ MUX_BEAGLE_XM();
dieid_num_r();
diff --git a/board/olio/h1/led.c b/board/olio/h1/led.c
deleted file mode 100644
index 89b8dd3c3..000000000
--- a/board/olio/h1/led.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2010 Texas Instruments, Inc.
- * Jason Kridner <jkridner@beagleboard.org>
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-#include <common.h>
-#include <status_led.h>
-#include <asm/arch/cpu.h>
-#include <asm/io.h>
-#include <asm/arch/sys_proto.h>
-#include <asm/gpio.h>
-
-/* GPIO pins for the LEDs */
-#define BEAGLE_LED_USR0 150
-#define BEAGLE_LED_USR1 149
-
-#ifdef STATUS_LED_GREEN
-void green_led_off(void)
-{
- __led_set (STATUS_LED_GREEN, 0);
-}
-
-void green_led_on(void)
-{
- __led_set (STATUS_LED_GREEN, 1);
-}
-#endif
-
-void __led_init (led_id_t mask, int state)
-{
- __led_set (mask, state);
-}
-
-void __led_toggle (led_id_t mask)
-{
- int state, toggle_gpio = 0;
-#ifdef STATUS_LED_BIT
- if (!toggle_gpio && STATUS_LED_BIT & mask)
- toggle_gpio = BEAGLE_LED_USR0;
-#endif
-#ifdef STATUS_LED_BIT1
- if (!toggle_gpio && STATUS_LED_BIT1 & mask)
- toggle_gpio = BEAGLE_LED_USR1;
-#endif
- if (toggle_gpio) {
- if (!gpio_request(toggle_gpio, "")) {
- gpio_direction_output(toggle_gpio, 0);
- state = gpio_get_value(toggle_gpio);
- gpio_set_value(toggle_gpio, !state);
- }
- }
-}
-
-void __led_set (led_id_t mask, int state)
-{
-#ifdef STATUS_LED_BIT
- if (STATUS_LED_BIT & mask) {
- if (!gpio_request(BEAGLE_LED_USR0, "")) {
- gpio_direction_output(BEAGLE_LED_USR0, 0);
- gpio_set_value(BEAGLE_LED_USR0, state);
- }
- }
-#endif
-#ifdef STATUS_LED_BIT1
- if (STATUS_LED_BIT1 & mask) {
- if (!gpio_request(BEAGLE_LED_USR1, "")) {
- gpio_direction_output(BEAGLE_LED_USR1, 0);
- gpio_set_value(BEAGLE_LED_USR1, state);
- }
- }
-#endif
-}