[PATCH 02/12] tegra: jetson-tk1: set hostname in board init
Lucas Stach
dev at lynxeye.de
Mon Nov 3 14:52:14 PST 2014
Signed-off-by: Lucas Stach <dev at lynxeye.de>
---
arch/arm/boards/nvidia-jetson-tk1/board.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boards/nvidia-jetson-tk1/board.c b/arch/arm/boards/nvidia-jetson-tk1/board.c
index c20f56a..564e6a0 100644
--- a/arch/arm/boards/nvidia-jetson-tk1/board.c
+++ b/arch/arm/boards/nvidia-jetson-tk1/board.c
@@ -26,7 +26,7 @@
#define AS3722_GPIO_SIGNAL_OUT 0x20
#define AS3722_SD_CONTROL 0x4d
-static int nvidia_jetson_tk1_devices_init(void)
+static int nvidia_jetson_tk1_fs_init(void)
{
struct i2c_client client;
u8 data;
@@ -47,4 +47,15 @@ static int nvidia_jetson_tk1_devices_init(void)
return 0;
}
-fs_initcall(nvidia_jetson_tk1_devices_init);
+fs_initcall(nvidia_jetson_tk1_fs_init);
+
+static int nvidia_jetson_tk1_device_init(void)
+{
+ if (!of_machine_is_compatible("nvidia,jetson-tk1"))
+ return 0;
+
+ barebox_set_hostname("jetson-tk1");
+
+ return 0;
+}
+device_initcall(nvidia_jetson_tk1_device_init);
--
1.9.3
More information about the barebox
mailing list