You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/12/11 18:02:34 UTC
[GitHub] [incubator-nuttx] acassis opened a new pull request #2522: xtensa/esp32: Add ESP32 EFUSE char driver
acassis opened a new pull request #2522:
URL: https://github.com/apache/incubator-nuttx/pull/2522
## Summary
Add ESP32 EFUSE char driver
## Impact
ESP32 users will be able to read/burn the EFUSEs
## Testing
Tested on esp32-wrover-kit board
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [incubator-nuttx] acassis closed pull request #2522: xtensa/esp32: Add ESP32 EFUSE char driver
Posted by GitBox <gi...@apache.org>.
acassis closed pull request #2522:
URL: https://github.com/apache/incubator-nuttx/pull/2522
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [incubator-nuttx] acassis commented on pull request #2522: xtensa/esp32: Add ESP32 EFUSE char driver
Posted by GitBox <gi...@apache.org>.
acassis commented on pull request #2522:
URL: https://github.com/apache/incubator-nuttx/pull/2522#issuecomment-746274783
> Hi @acassis
> Thanks for your commit and I see this PR is still in draft status.
> It is appreciate if the esp32 board test app or example could be shared after modification, thank you very much!
> BRs
> Feng
Thank you @sdc-g I will submit the example so you can use it with the current draft example
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [incubator-nuttx] acassis commented on pull request #2522: xtensa/esp32: Add ESP32 EFUSE char driver
Posted by GitBox <gi...@apache.org>.
acassis commented on pull request #2522:
URL: https://github.com/apache/incubator-nuttx/pull/2522#issuecomment-752734570
I'll submit the new generic driver
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [incubator-nuttx] sdc-g commented on pull request #2522: xtensa/esp32: Add ESP32 EFUSE char driver
Posted by GitBox <gi...@apache.org>.
sdc-g commented on pull request #2522:
URL: https://github.com/apache/incubator-nuttx/pull/2522#issuecomment-747183947
> driver
No hurry, @acassis , it is OK if the example based on the final version.
Thanks for your quick response!
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [incubator-nuttx] acassis edited a comment on pull request #2522: xtensa/esp32: Add ESP32 EFUSE char driver
Posted by GitBox <gi...@apache.org>.
acassis edited a comment on pull request #2522:
URL: https://github.com/apache/incubator-nuttx/pull/2522#issuecomment-746274783
> Hi @acassis
> Thanks for your commit and I see this PR is still in draft status.
> It is appreciate if the esp32 board test app or example could be shared after modification, thank you very much!
> BRs
> Feng
Thank you @sdc-g I will submit the example so you can use it with the current draft driver
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #2522: xtensa/esp32: Add ESP32 EFUSE char driver
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #2522:
URL: https://github.com/apache/incubator-nuttx/pull/2522#discussion_r541510110
##########
File path: include/nuttx/efuse/esp_efuse.h
##########
@@ -0,0 +1,184 @@
+/****************************************************************************
+ * include/nuttx/efuse/esp_efuse.h
Review comment:
Can we define a generic efuse driver interface? So not only ESP but also other chip can implement this interface.
##########
File path: arch/xtensa/src/esp32/esp32_efuse.c
##########
@@ -0,0 +1,376 @@
+/****************************************************************************
+ * arch/xtensa/src/esp32/esp32_efuse.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 <stdlib.h>
+#include <debug.h>
+#include <assert.h>
+#include <nuttx/kmalloc.h>
+#include <nuttx/efuse/esp_efuse.h>
+
+#include "hardware/esp32_soc.h"
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/* Character driver methods */
+
+static int efuse_open(FAR struct file *filep);
+static int efuse_close(FAR struct file *filep);
+static ssize_t efuse_read(FAR struct file *filep, FAR char *buffer,
+ size_t buflen);
+static ssize_t efuse_write(FAR struct file *filep, FAR const char *buffer,
+ size_t buflen);
+static int efuse_ioctl(FAR struct file *filep, int cmd,
+ unsigned long arg);
+
+/* This structure is used for access control and batch writing mode */
+
+struct efuse_access_s
+{
+ sem_t exclsem; /* Supports mutual exclusion */
+ bool batch_writing_mode; /* Controls batch writing */
+};
+
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+static const struct file_operations g_efusefops =
Review comment:
Like the previous comment, it's better to extract g_efusefops to an upper half driver.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [incubator-nuttx] sdc-g commented on pull request #2522: xtensa/esp32: Add ESP32 EFUSE char driver
Posted by GitBox <gi...@apache.org>.
sdc-g commented on pull request #2522:
URL: https://github.com/apache/incubator-nuttx/pull/2522#issuecomment-745867177
Hi @acassis
Thanks for your commit and I see this PR is still in draft status.
It is appreciate if the esp32 board test app or example could be shared after modification, thank you very much!
BRs
Feng
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [incubator-nuttx] acassis commented on pull request #2522: xtensa/esp32: Add ESP32 EFUSE char driver
Posted by GitBox <gi...@apache.org>.
acassis commented on pull request #2522:
URL: https://github.com/apache/incubator-nuttx/pull/2522#issuecomment-748126285
> > driver
>
> No hurry, @acassis , it is OK if the example based on the final version.
> Thanks for your quick response!
I already did it: https://github.com/apache/incubator-nuttx-apps/pull/526
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [incubator-nuttx] acassis commented on a change in pull request #2522: xtensa/esp32: Add ESP32 EFUSE char driver
Posted by GitBox <gi...@apache.org>.
acassis commented on a change in pull request #2522:
URL: https://github.com/apache/incubator-nuttx/pull/2522#discussion_r541995122
##########
File path: arch/xtensa/src/esp32/esp32_efuse.c
##########
@@ -0,0 +1,376 @@
+/****************************************************************************
+ * arch/xtensa/src/esp32/esp32_efuse.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 <stdlib.h>
+#include <debug.h>
+#include <assert.h>
+#include <nuttx/kmalloc.h>
+#include <nuttx/efuse/esp_efuse.h>
+
+#include "hardware/esp32_soc.h"
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/* Character driver methods */
+
+static int efuse_open(FAR struct file *filep);
+static int efuse_close(FAR struct file *filep);
+static ssize_t efuse_read(FAR struct file *filep, FAR char *buffer,
+ size_t buflen);
+static ssize_t efuse_write(FAR struct file *filep, FAR const char *buffer,
+ size_t buflen);
+static int efuse_ioctl(FAR struct file *filep, int cmd,
+ unsigned long arg);
+
+/* This structure is used for access control and batch writing mode */
+
+struct efuse_access_s
+{
+ sem_t exclsem; /* Supports mutual exclusion */
+ bool batch_writing_mode; /* Controls batch writing */
+};
+
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+static const struct file_operations g_efusefops =
Review comment:
Hi @xiaoxiang781216 I agree with these modifications to support a generic efuse driver. Just moved this PR to Draft
----------------------------------------------------------------
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:
users@infra.apache.org