Full support for Ginger Console
[linux-ginger.git] / arch / arm / mach-bcmring / csp / chipc / chipcHw_str.c
blob54ad964fe94ca4146922921d4e6a5fc40b00ff2d
1 /*****************************************************************************
2 * Copyright 2008 Broadcom Corporation. All rights reserved.
4 * Unless you and Broadcom execute a separate written software license
5 * agreement governing use of this software, this software is licensed to you
6 * under the terms of the GNU General Public License version 2, available at
7 * http://www.broadcom.com/licenses/GPLv2.php (the "GPL").
9 * Notwithstanding the above, under no circumstances may you combine this
10 * software in any way with any other Broadcom software provided under a
11 * license other than the GPL, without Broadcom's express prior written
12 * consent.
13 *****************************************************************************/
14 /****************************************************************************/
15 /**
16 * @file chipcHw_str.c
18 * @brief Contains strings which are useful to linux and csp
20 * @note
22 /****************************************************************************/
24 /* ---- Include Files ---------------------------------------------------- */
26 #include <mach/csp/chipcHw_inline.h>
28 /* ---- Private Constants and Types --------------------------------------- */
30 static const char *gMuxStr[] = {
31 "GPIO", /* 0 */
32 "KeyPad", /* 1 */
33 "I2C-Host", /* 2 */
34 "SPI", /* 3 */
35 "Uart", /* 4 */
36 "LED-Mtx-P", /* 5 */
37 "LED-Mtx-S", /* 6 */
38 "SDIO-0", /* 7 */
39 "SDIO-1", /* 8 */
40 "PCM", /* 9 */
41 "I2S", /* 10 */
42 "ETM", /* 11 */
43 "Debug", /* 12 */
44 "Misc", /* 13 */
45 "0xE", /* 14 */
46 "0xF", /* 15 */
49 /****************************************************************************/
50 /**
51 * @brief Retrieves a string representation of the mux setting for a pin.
53 * @return Pointer to a character string.
55 /****************************************************************************/
57 const char *chipcHw_getGpioPinFunctionStr(int pin)
59 if ((pin < 0) || (pin >= chipcHw_GPIO_COUNT)) {
60 return "";
63 return gMuxStr[chipcHw_getGpioPinFunction(pin)];