summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/cbfs.c16
-rw-r--r--src/lib/cbmem.c10
-rw-r--r--src/lib/compute_ip_checksum.c2
-rw-r--r--src/lib/generic_dump_spd.c8
-rw-r--r--src/lib/generic_sdram.c2
-rw-r--r--src/lib/jpeg.c2
-rw-r--r--src/lib/lzma.c2
-rw-r--r--src/lib/lzmadecode.c40
-rw-r--r--src/lib/lzmadecode.h12
-rw-r--r--src/lib/nrv2b.c4
-rw-r--r--src/lib/ramtest.c6
-rw-r--r--src/lib/uart8250.c2
-rw-r--r--src/lib/usbdebug_direct.c22
-rw-r--r--src/lib/xmodem.c2
14 files changed, 65 insertions, 65 deletions
diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c
index 390e7796e8..690033e6b0 100644
--- a/src/lib/cbfs.c
+++ b/src/lib/cbfs.c
@@ -160,11 +160,11 @@ void *cbfs_load_optionrom(u16 vendor, u16 device, void * dest)
if (orom == NULL)
return NULL;
- /* They might have specified a dest address. If so, we can decompress.
+ /* They might have specified a dest address. If so, we can decompress.
* If not, there's not much hope of decompressing or relocating the rom.
* in the common case, the expansion rom is uncompressed, we
- * pass 0 in for the dest, and all we have to do is find the rom and
- * return a pointer to it.
+ * pass 0 in for the dest, and all we have to do is find the rom and
+ * return a pointer to it.
*/
/* BUG: the cbfstool is (not yet) including a cbfs_optionrom header */
@@ -193,9 +193,9 @@ void * cbfs_load_stage(const char *name)
if (stage == NULL)
return (void *) -1;
- printk(BIOS_INFO, "Stage: loading %s @ 0x%x (%d bytes), entry @ 0x%llx\n",
+ printk(BIOS_INFO, "Stage: loading %s @ 0x%x (%d bytes), entry @ 0x%llx\n",
name,
- (u32) stage->load, stage->memlen,
+ (u32) stage->load, stage->memlen,
stage->entry);
memset((void *) (u32) stage->load, 0, stage->memlen);
@@ -235,9 +235,9 @@ int cbfs_execute_stage(const char *name)
/**
* run_address is passed the address of a function taking no parameters and
- * jumps to it, returning the result.
- * @param f the address to call as a function.
- * @return value returned by the function.
+ * jumps to it, returning the result.
+ * @param f the address to call as a function.
+ * @return value returned by the function.
*/
int run_address(void *f)
diff --git a/src/lib/cbmem.c b/src/lib/cbmem.c
index 9e8aff3e67..7e3e20123a 100644
--- a/src/lib/cbmem.c
+++ b/src/lib/cbmem.c
@@ -67,7 +67,7 @@ void cbmem_init(u64 baseaddr, u64 size)
#ifndef __PRE_RAM__
bss_cbmem_toc = cbmem_toc;
#endif
-
+
debug("Initializing CBMEM area to 0x%llx (%lld bytes)\n", baseaddr, size);
if (size < (64 * 1024)) {
@@ -103,7 +103,7 @@ void *cbmem_add(u32 id, u64 size)
struct cbmem_entry *cbmem_toc;
int i;
cbmem_toc = get_cbmem_toc();
-
+
if (cbmem_toc == NULL) {
return NULL;
}
@@ -121,7 +121,7 @@ void *cbmem_add(u32 id, u64 size)
/* Align size to 512 byte blocks */
- size = ALIGN(size, 512) < cbmem_toc[0].size ?
+ size = ALIGN(size, 512) < cbmem_toc[0].size ?
ALIGN(size, 512) : cbmem_toc[0].size;
/* Now look for the first free/usable TOC entry */
@@ -155,7 +155,7 @@ void *cbmem_find(u32 id)
struct cbmem_entry *cbmem_toc;
int i;
cbmem_toc = get_cbmem_toc();
-
+
if (cbmem_toc == NULL)
return NULL;
@@ -197,7 +197,7 @@ void cbmem_list(void)
struct cbmem_entry *cbmem_toc;
int i;
cbmem_toc = get_cbmem_toc();
-
+
if (cbmem_toc == NULL)
return;
diff --git a/src/lib/compute_ip_checksum.c b/src/lib/compute_ip_checksum.c
index 9306baf5d0..48f93d4699 100644
--- a/src/lib/compute_ip_checksum.c
+++ b/src/lib/compute_ip_checksum.c
@@ -39,7 +39,7 @@ unsigned long add_ip_checksums(unsigned long offset, unsigned long sum, unsigned
sum = ~sum & 0xFFFF;
new = ~new & 0xFFFF;
if (offset & 1) {
- /* byte swap the sum if it came from an odd offset
+ /* byte swap the sum if it came from an odd offset
* since the computation is endian independant this
* works.
*/
diff --git a/src/lib/generic_dump_spd.c b/src/lib/generic_dump_spd.c
index 2fe1ea305b..32a572e44c 100644
--- a/src/lib/generic_dump_spd.c
+++ b/src/lib/generic_dump_spd.c
@@ -12,8 +12,8 @@ static void dump_spd_registers(const struct mem_controller *ctrl)
device = ctrl->channel0[i];
if (device) {
int j;
- print_debug("dimm: ");
- print_debug_hex8(i);
+ print_debug("dimm: ");
+ print_debug_hex8(i);
print_debug(".0: ");
print_debug_hex8(device);
for(j = 0; j < 256; j++) {
@@ -38,8 +38,8 @@ static void dump_spd_registers(const struct mem_controller *ctrl)
device = ctrl->channel1[i];
if (device) {
int j;
- print_debug("dimm: ");
- print_debug_hex8(i);
+ print_debug("dimm: ");
+ print_debug_hex8(i);
print_debug(".1: ");
print_debug_hex8(device);
for(j = 0; j < 256; j++) {
diff --git a/src/lib/generic_sdram.c b/src/lib/generic_sdram.c
index edecc06850..8a06252170 100644
--- a/src/lib/generic_sdram.c
+++ b/src/lib/generic_sdram.c
@@ -45,7 +45,7 @@ void sdram_initialize(int controllers, const struct mem_controller *ctrl)
}
/* Now that everything is setup enable the SDRAM.
- * Some chipsets do the work for us while on others
+ * Some chipsets do the work for us while on others
* we need to it by hand.
*/
print_debug("Ram3\n");
diff --git a/src/lib/jpeg.c b/src/lib/jpeg.c
index 1e917c2b40..4297299ee5 100644
--- a/src/lib/jpeg.c
+++ b/src/lib/jpeg.c
@@ -270,7 +270,7 @@ int jpeg_check_size(unsigned char *buf, int width, int height)
return 1;
}
-int jpeg_decode(unsigned char *buf, unsigned char *pic,
+int jpeg_decode(unsigned char *buf, unsigned char *pic,
int width, int height, int depth, struct jpeg_decdata *decdata)
{
int i, j, m, tac, tdc;
diff --git a/src/lib/lzma.c b/src/lib/lzma.c
index 532a2b2614..be0f386bdf 100644
--- a/src/lib/lzma.c
+++ b/src/lib/lzma.c
@@ -1,4 +1,4 @@
-/*
+/*
Coreboot interface to memory-saving variant of LZMA decoder
diff --git a/src/lib/lzmadecode.c b/src/lib/lzmadecode.c
index 65819b53cf..1cf647d27b 100644
--- a/src/lib/lzmadecode.c
+++ b/src/lib/lzmadecode.c
@@ -1,21 +1,21 @@
/*
LzmaDecode.c
LZMA Decoder (optimized for Speed version)
-
+
LZMA SDK 4.40 Copyright (c) 1999-2006 Igor Pavlov (2006-05-01)
http://www.7-zip.org/
LZMA SDK is licensed under two licenses:
1) GNU Lesser General Public License (GNU LGPL)
2) Common Public License (CPL)
- It means that you can select one of these two licenses and
+ It means that you can select one of these two licenses and
follow rules of that license.
SPECIAL EXCEPTION:
- Igor Pavlov, as the author of this Code, expressly permits you to
- statically or dynamically link your Code (or bind by name) to the
- interfaces of this file without subjecting your linked Code to the
- terms of the CPL or GNU LGPL. Any modifications or additions
+ Igor Pavlov, as the author of this Code, expressly permits you to
+ statically or dynamically link your Code (or bind by name) to the
+ interfaces of this file without subjecting your linked Code to the
+ terms of the CPL or GNU LGPL. Any modifications or additions
to this file, however, are subject to the LGPL or CPL terms.
*/
@@ -37,7 +37,7 @@
#define RC_TEST { if (Buffer == BufferLim) return LZMA_RESULT_DATA_ERROR; }
#define RC_INIT(buffer, bufferSize) Buffer = buffer; BufferLim = buffer + bufferSize; RC_INIT2
-
+
#define RC_NORMALIZE if (Range < kTopValue) { RC_TEST; Range <<= 8; Code = (Code << 8) | RC_READ_BYTE; }
@@ -47,9 +47,9 @@
#define RC_GET_BIT2(p, mi, A0, A1) IfBit0(p) \
{ UpdateBit0(p); mi <<= 1; A0; } else \
- { UpdateBit1(p); mi = (mi + mi) + 1; A1; }
-
-#define RC_GET_BIT(p, mi) RC_GET_BIT2(p, mi, ; , ;)
+ { UpdateBit1(p); mi = (mi + mi) + 1; A1; }
+
+#define RC_GET_BIT(p, mi) RC_GET_BIT2(p, mi, ; , ;)
#define RangeDecoderBitTreeDecode(probs, numLevels, res) \
{ int i = numLevels; res = 1; \
@@ -72,7 +72,7 @@
#define LenLow (LenChoice2 + 1)
#define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits))
#define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits))
-#define kNumLenProbs (LenHigh + kLenNumHighSymbols)
+#define kNumLenProbs (LenHigh + kLenNumHighSymbols)
#define kNumStates 12
@@ -161,7 +161,7 @@ int LzmaDecode(CLzmaDecoderState *vs,
for (i = 0; i < numProbs; i++)
p[i] = kBitModelTotal >> 1;
}
-
+
RC_INIT(inStream, inSize);
@@ -170,7 +170,7 @@ int LzmaDecode(CLzmaDecoderState *vs,
CProb *prob;
UInt32 bound;
int posState = (int)(
- (nowPos
+ (nowPos
)
& posStateMask);
@@ -179,9 +179,9 @@ int LzmaDecode(CLzmaDecoderState *vs,
{
int symbol = 1;
UpdateBit0(prob)
- prob = p + Literal + (LZMA_LIT_SIZE *
+ prob = p + Literal + (LZMA_LIT_SIZE *
(((
- (nowPos
+ (nowPos
)
& literalPosMask) << lc) + (previousByte >> (8 - lc))));
@@ -212,7 +212,7 @@ int LzmaDecode(CLzmaDecoderState *vs,
else if (state < 10) state -= 3;
else state -= 6;
}
- else
+ else
{
UpdateBit1(prob);
prob = p + IsRep + state;
@@ -236,10 +236,10 @@ int LzmaDecode(CLzmaDecoderState *vs,
IfBit0(prob)
{
UpdateBit0(prob);
-
+
if (nowPos == 0)
return LZMA_RESULT_DATA_ERROR;
-
+
state = state < kNumLitStates ? 9 : 11;
previousByte = outStream[nowPos - rep0];
outStream[nowPos++] = previousByte;
@@ -261,7 +261,7 @@ int LzmaDecode(CLzmaDecoderState *vs,
UpdateBit0(prob);
distance = rep1;
}
- else
+ else
{
UpdateBit1(prob);
prob = p + IsRepG2 + state;
@@ -322,7 +322,7 @@ int LzmaDecode(CLzmaDecoderState *vs,
int posSlot;
state += kNumLitStates;
prob = p + PosSlot +
- ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) <<
+ ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) <<
kNumPosSlotBits);
RangeDecoderBitTreeDecode(prob, kNumPosSlotBits, posSlot);
if (posSlot >= kStartPosModelIndex)
diff --git a/src/lib/lzmadecode.h b/src/lib/lzmadecode.h
index dedde0de67..34c9f14c33 100644
--- a/src/lib/lzmadecode.h
+++ b/src/lib/lzmadecode.h
@@ -1,4 +1,4 @@
-/*
+/*
LzmaDecode.h
LZMA Decoder interface
@@ -8,14 +8,14 @@
LZMA SDK is licensed under two licenses:
1) GNU Lesser General Public License (GNU LGPL)
2) Common Public License (CPL)
- It means that you can select one of these two licenses and
+ It means that you can select one of these two licenses and
follow rules of that license.
SPECIAL EXCEPTION:
- Igor Pavlov, as the author of this code, expressly permits you to
- statically or dynamically link your code (or bind by name) to the
- interfaces of this file without subjecting your linked code to the
- terms of the CPL or GNU LGPL. Any modifications or additions
+ Igor Pavlov, as the author of this code, expressly permits you to
+ statically or dynamically link your code (or bind by name) to the
+ interfaces of this file without subjecting your linked code to the
+ terms of the CPL or GNU LGPL. Any modifications or additions
to this file, however, are subject to the LGPL or CPL terms.
*/
diff --git a/src/lib/nrv2b.c b/src/lib/nrv2b.c
index c91eda5047..d84e99ec0b 100644
--- a/src/lib/nrv2b.c
+++ b/src/lib/nrv2b.c
@@ -1,4 +1,4 @@
-// This GETBIT is supposed to work on little endian
+// This GETBIT is supposed to work on little endian
// 32bit systems. The algorithm will definitely need
// some fixing on other systems, but it might not be
// a problem since the nrv2b binary behaves the same..
@@ -37,7 +37,7 @@ static unsigned long unrv2b(uint8_t * src, uint8_t * dst, unsigned long *ilen_p)
// skip length
src += 4;
- /* FIXME: check olen with the length stored in first 4 bytes */
+ /* FIXME: check olen with the length stored in first 4 bytes */
for (;;) {
unsigned int m_off, m_len;
diff --git a/src/lib/ramtest.c b/src/lib/ramtest.c
index 605d555e46..98872a47d7 100644
--- a/src/lib/ramtest.c
+++ b/src/lib/ramtest.c
@@ -48,7 +48,7 @@ static void phys_memory_barrier(void)
static void ram_fill(unsigned long start, unsigned long stop)
{
unsigned long addr;
- /*
+ /*
* Fill.
*/
#if CONFIG_USE_PRINTK_IN_CAR
@@ -85,7 +85,7 @@ static void ram_verify(unsigned long start, unsigned long stop)
{
unsigned long addr;
int i = 0;
- /*
+ /*
* Verify.
*/
#if CONFIG_USE_PRINTK_IN_CAR
@@ -168,7 +168,7 @@ void ram_check(unsigned long start, unsigned long stop)
#else
print_debug("Testing DRAM : ");
print_debug_hex32(start);
- print_debug("-");
+ print_debug("-");
print_debug_hex32(stop);
print_debug("\n");
#endif
diff --git a/src/lib/uart8250.c b/src/lib/uart8250.c
index 79eb1c51c1..3dbee0b464 100644
--- a/src/lib/uart8250.c
+++ b/src/lib/uart8250.c
@@ -33,7 +33,7 @@ static inline void uart8250_wait_to_tx_byte(unsigned base_port)
static inline void uart8250_wait_until_sent(unsigned base_port)
{
- while(!(inb(base_port + UART_LSR) & 0x40))
+ while(!(inb(base_port + UART_LSR) & 0x40))
;
}
diff --git a/src/lib/usbdebug_direct.c b/src/lib/usbdebug_direct.c
index cb70c625e2..d2e46729d1 100644
--- a/src/lib/usbdebug_direct.c
+++ b/src/lib/usbdebug_direct.c
@@ -87,7 +87,7 @@ static int dbgp_wait_until_complete(struct ehci_dbg_port *ehci_debug)
/* Stop when the transaction is finished */
if (ctrl & DBGP_DONE)
break;
- } while(--loop>0);
+ } while(--loop>0);
if (!loop) return -1000;
@@ -132,7 +132,7 @@ retry:
*/
if ((lpid == USB_PID_NAK) || (lpid == USB_PID_NYET))
dbgp_breath();
-
+
/* If I get a NACK reissue the transmission */
if (lpid == USB_PID_NAK) {
if (--loop > 0) goto retry;
@@ -179,7 +179,7 @@ static int dbgp_bulk_write(struct ehci_dbg_port *ehci_debug, unsigned devnum, un
pids = read32(&ehci_debug->pids);
pids = DBGP_PID_UPDATE(pids, USB_PID_OUT);
-
+
ctrl = read32(&ehci_debug->control);
ctrl = DBGP_LEN_UPDATE(ctrl, size);
ctrl |= DBGP_OUT;
@@ -213,12 +213,12 @@ static int dbgp_bulk_read(struct ehci_dbg_port *ehci_debug, unsigned devnum, uns
pids = read32(&ehci_debug->pids);
pids = DBGP_PID_UPDATE(pids, USB_PID_IN);
-
+
ctrl = read32(&ehci_debug->control);
ctrl = DBGP_LEN_UPDATE(ctrl, size);
ctrl &= ~DBGP_OUT;
ctrl |= DBGP_GO;
-
+
write32(&ehci_debug->address, addr);
write32(&ehci_debug->pids, pids);
ret = dbgp_wait_until_done(ehci_debug, ctrl);
@@ -234,7 +234,7 @@ int dbgp_bulk_read_x(struct ehci_debug_info *dbg_info, void *data, int size)
return dbgp_bulk_read(dbg_info->ehci_debug, dbg_info->devnum, dbg_info->endpoint_in, data, size);
}
-static int dbgp_control_msg(struct ehci_dbg_port *ehci_debug, unsigned devnum, int requesttype, int request,
+static int dbgp_control_msg(struct ehci_dbg_port *ehci_debug, unsigned devnum, int requesttype, int request,
int value, int index, void *data, int size)
{
unsigned pids, addr, ctrl;
@@ -245,7 +245,7 @@ static int dbgp_control_msg(struct ehci_dbg_port *ehci_debug, unsigned devnum, i
read = (requesttype & USB_DIR_IN) != 0;
if (size > (read?DBGP_MAX_PACKET:0))
return -1;
-
+
/* Compute the control message */
req.bRequestType = requesttype;
req.bRequest = request;
@@ -298,7 +298,7 @@ static int ehci_reset_port(struct ehci_regs *ehci_regs, int port)
loop = 2;
write32(&ehci_regs->port_status[port - 1],
portsc & ~(PORT_RWC_BITS | PORT_RESET));
- do {
+ do {
dbgp_mdelay(delay);
portsc = read32(&ehci_regs->port_status[port - 1]);
delay_time += delay;
@@ -395,7 +395,7 @@ try_next_port:
set_debug_port(debug_port);
goto try_next_time;
}
- return;
+ return;
}
/* Reset the EHCI controller */
@@ -492,7 +492,7 @@ try_next_port:
USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_DEVICE,
USB_REQ_SET_ADDRESS, USB_DEBUG_DEVNUM, 0, (void *)0, 0);
if (ret < 0) {
- dbgp_printk("Could not move attached device to %d.\n",
+ dbgp_printk("Could not move attached device to %d.\n",
USB_DEBUG_DEVNUM);
goto err;
}
@@ -525,7 +525,7 @@ try_next_port:
info->devnum = devnum;
info->endpoint_out = dbgp_endpoint_out;
info->endpoint_in = dbgp_endpoint_in;
-
+
return;
err:
/* Things didn't work so remove my claim */
diff --git a/src/lib/xmodem.c b/src/lib/xmodem.c
index 465d6670a3..2d553bed03 100644
--- a/src/lib/xmodem.c
+++ b/src/lib/xmodem.c
@@ -143,7 +143,7 @@ int xmodemReceive(unsigned char *dest, int destsz)
*p++ = c;
}
- if (xbuff[1] == (unsigned char)(~xbuff[2]) &&
+ if (xbuff[1] == (unsigned char)(~xbuff[2]) &&
(xbuff[1] == packetno || xbuff[1] == (unsigned char)packetno-1) &&
check(crc, &xbuff[3], bufsz)) {
if (xbuff[1] == packetno) {