patacongo commented on a change in pull request #1728:
URL: https://github.com/apache/incubator-nuttx/pull/1728#discussion_r489470538



##########
File path: boards/arm/sama5/giant-board/src/sam_bringup.c
##########
@@ -0,0 +1,400 @@
+/****************************************************************************
+ *  boards/arm/sama5/giant-board/src/sam_bringup.c
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.  The
+ *  ASF licenses this file to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance with the
+ *  License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ *  License for the specific language governing permissions and limitations
+ *  under the License.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <sys/mount.h>
+#include <stdlib.h>
+#include <syslog.h>
+#include <debug.h>
+#include <string.h>
+
+#include <nuttx/irq.h>
+#include <nuttx/kthread.h>
+#include <nuttx/usb/usbdev.h>
+#include <nuttx/usb/usbhost.h>
+#include <nuttx/usb/usbdev_trace.h>
+
+#include "giant-board.h"
+
+#ifdef CONFIG_CDCACM
+#  include <nuttx/usb/cdcacm.h>
+#endif
+
+#ifdef CONFIG_NET_CDCECM
+#  include <nuttx/usb/cdcecm.h>
+#  include <net/if.h>
+#endif
+
+#ifdef CONFIG_USBMONITOR
+#  include <nuttx/usb/usbmonitor.h>
+#endif
+
+#ifdef CONFIG_RNDIS
+#  include <nuttx/usb/rndis.h>
+#endif
+
+#ifdef CONFIG_MMCSD
+#  include <nuttx/mmcsd.h>
+#  include "sam_sdmmc.h"
+#endif
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#define NSECTORS(n) \
+  (((n)+CONFIG_GIANTBOARD_ROMFS_ROMDISK_SECTSIZE-1) / \
+   CONFIG_GIANTBOARD_ROMFS_ROMDISK_SECTSIZE)
+
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: sam_i2c_register
+ *
+ * Description:
+ *   Register one I2C drivers for the I2C tool.
+ *
+ ****************************************************************************/
+
+#ifdef HAVE_I2CTOOL
+static void sam_i2c_register(int bus)
+{
+  FAR struct i2c_master_s *i2c;
+  int ret;
+
+  i2c = sam_i2cbus_initialize(bus);
+  if (i2c == NULL)
+    {
+      i2cerr("ERROR: Failed to get I2C%d interface\n", bus);
+    }
+  else
+    {
+      ret = i2c_register(i2c, bus);
+      if (ret < 0)
+        {
+          i2cerr("ERROR: Failed to register I2C%d driver: %d\n", bus, ret);
+          sam_i2cbus_uninitialize(i2c);
+        }
+    }
+}
+#endif
+
+/****************************************************************************
+ * Name: sam_i2ctool
+ *
+ * Description:
+ *   Register I2C drivers for the I2C tool.
+ *
+ ****************************************************************************/
+
+#ifdef HAVE_I2CTOOL
+static void sam_i2ctool(void)
+{
+#ifdef CONFIG_SAMA5_TWI0
+  sam_i2c_register(0);
+#endif
+#ifdef CONFIG_SAMA5_TWI1
+  sam_i2c_register(1);
+#endif
+#ifdef CONFIG_SAMA5_TWI2
+  sam_i2c_register(2);
+#endif
+#ifdef CONFIG_SAMA5_TWI3
+  sam_i2c_register(3);
+#endif
+}
+#else
+#  define sam_i2ctool()
+#endif
+
+/****************************************************************************
+ * Name: nsh_sdmmc_initialize
+ *
+ * Description:
+ *   Initialize SDMMC drivers
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_SAMA5_SDMMC
+
+static int nsh_sdmmc_initialize(void)
+{

Review comment:
       Remove this function.  The Giant Board does not support the SDMMC 
interface.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to