Deleted Added
sdiff udiff text old ( 232812 ) new ( 242273 )
full compact
1/***********************license start***************
2 * Copyright (c) 2003-2010 Cavium Inc. (support@cavium.com). All rights
3 * reserved.
4 *
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met:

--- 38 unchanged lines hidden (view full) ---

47 * @file
48 *
49 * Interface to the EBT3000 specific devices
50 *
51 * <hr>$Revision: 70030 $<hr>
52 *
53 */
54
55#include "cvmx-config.h"
56#include "cvmx.h"
57#include "cvmx-sysinfo.h"
58
59
60void ebt3000_char_write(int char_position, char val)
61{
62 /* Note: phys_to_ptr won't work here, as we are most likely going to access the boot bus. */
63 void *led_base = CASTPTR(void, CVMX_ADD_SEG32(CVMX_MIPS32_SPACE_KSEG0, cvmx_sysinfo_get()->led_display_base_addr));
64 if (!led_base)
65 return;
66 if (cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_EBT3000 && cvmx_sysinfo_get()->board_rev_major == 1)
67 {
68 /* Rev 1 board */
69 char *ptr = (char *)(led_base + 4);
70 char_position &= 0x3; /* only 4 chars */
71 ptr[3 - char_position] = val;

--- 5 unchanged lines hidden (view full) ---

77 char_position &= 0x7; /* only 8 chars */
78 ptr[char_position] = val;
79 }
80}
81
82void ebt3000_str_write(const char *str)
83{
84 /* Note: phys_to_ptr won't work here, as we are most likely going to access the boot bus. */
85 void *led_base;
86 if (!cvmx_sysinfo_get()->led_display_base_addr)
87 return;
88 led_base = CASTPTR(void, CVMX_ADD_SEG32(CVMX_MIPS32_SPACE_KSEG0, cvmx_sysinfo_get()->led_display_base_addr));
89 if (cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_EBT3000 && cvmx_sysinfo_get()->board_rev_major == 1)
90 {
91 char *ptr = (char *)(led_base + 4);
92 int i;
93 for (i=0; i<4; i++)
94 {
95 if (*str)
96 ptr[3 - i] = *str++;

--- 18 unchanged lines hidden ---