]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - sim/bfin/dv-bfin_spi.c
Copyright year update in most files of the GDB Project.
[thirdparty/binutils-gdb.git] / sim / bfin / dv-bfin_spi.c
index 4c783d05855ae6f97500fc070c5e67df12724a88..f034f4cdd99163b505378aba4df604b48d7057b0 100644 (file)
@@ -1,6 +1,6 @@
 /* Blackfin Serial Peripheral Interface (SPI) model
 
-   Copyright (C) 2010-2011 Free Software Foundation, Inc.
+   Copyright (C) 2010-2012 Free Software Foundation, Inc.
    Contributed by Analog Devices, Inc.
 
    This file is part of simulators.
@@ -49,7 +49,8 @@ struct bfin_spi
 #define mmr_base()      offsetof(struct bfin_spi, ctl)
 #define mmr_offset(mmr) (offsetof(struct bfin_spi, mmr) - mmr_base())
 
-static const char * const mmr_names[] = {
+static const char * const mmr_names[] =
+{
   "SPI_CTL", "SPI_FLG", "SPI_STAT", "SPI_TDBR",
   "SPI_RDBR", "SPI_BAUD", "SPI_SHADOW",
 };
@@ -87,7 +88,7 @@ bfin_spi_io_write_buffer (struct hw *me, const void *source, int space,
   switch (mmr_off)
     {
     case mmr_offset(stat):
-      dv_w1c_2 (valuep, value, SPIF | TXS | RXS);
+      dv_w1c_2 (valuep, value, ~(SPIF | TXS | RXS));
       break;
     case mmr_offset(tdbr):
       *valuep = value;
@@ -168,7 +169,8 @@ bfin_spi_dma_write_buffer (struct hw *me, const void *source,
   return 0;
 }
 
-static const struct hw_port_descriptor bfin_spi_ports[] = {
+static const struct hw_port_descriptor bfin_spi_ports[] =
+{
   { "stat", 0, 0, output_port, },
   { NULL, 0, 0, 0, },
 };
@@ -223,7 +225,8 @@ bfin_spi_finish (struct hw *me)
   spi->stat = 0x0001;
 }
 
-const struct hw_descriptor dv_bfin_spi_descriptor[] = {
+const struct hw_descriptor dv_bfin_spi_descriptor[] =
+{
   {"bfin_spi", bfin_spi_finish,},
   {NULL, NULL},
 };