rtos/tinyara.git
7 years agodrivers/adc: update upper-half layer
Heesub Shin [Thu, 6 Apr 2017 03:53:32 +0000 (12:53 +0900)]
drivers/adc: update upper-half layer

This commit updates the upper-half driver of ADC subsystem,
synchronizing with the latest version of NuttX. ADC drivers that
implements the lower-half can be broken with this commit, but in TizenRT
there is no lower-half driver of ADC. Thus, this commit does not cause
any harm. All credits should go to many other contributors who wrote the
original patches for NuttX. Sorry for not listing their names here.

Change-Id: I42dc6b1fa597ae74494ef635897b4bc695e1c343
[Shin: backported from the latest NuttX]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agokernel/semaphore: fix compilation errors
Heesub Shin [Thu, 6 Apr 2017 02:27:06 +0000 (11:27 +0900)]
kernel/semaphore: fix compilation errors

Handle a case of missing proxy sem_setprotocol. Reorder so that (1) this
error is avoided, and (2) no proxy is needed if priority inheritance is
not enabled.

Change-Id: I4421e3e929567fcdb43fdd2e031e49ceb6fc252f
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Shin: backported 73fc186b from NuttX]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agokernel/semaphore: fix broken macros
Heesub Shin [Thu, 6 Apr 2017 02:11:50 +0000 (11:11 +0900)]
kernel/semaphore: fix broken macros

Fixes compilation errors that might happen when
CONFIG_PRIORITY_INHERITANCE is not set.

Change-Id: I926c32914e928de03c11015aa64a63164f19d25c
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Shin: backported 4c8ec0d2 from NuttX]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agokernel/sched: disable priority inheritance on all signaling semaphores
Heesub Shin [Thu, 6 Apr 2017 02:02:50 +0000 (11:02 +0900)]
kernel/sched: disable priority inheritance on all signaling semaphores

Disable priority inheritance on all semaphores used for signaling.

Change-Id: Iaaac2a321fb127e76d01c1eadf625f47134181b0
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Shin: backported 1da3a5f from NuttX]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agofs: disable priority inheritance on all signaling semaphores
Heesub Shin [Thu, 6 Apr 2017 01:56:27 +0000 (10:56 +0900)]
fs: disable priority inheritance on all signaling semaphores

Disable priority inheritance on all semaphores used for signaling.

Change-Id: I2d032767bff07012d7724a2228705dc125d42fd8
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Shin: backported dbbe46a2 from NuttX]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agodrivers: disable priority inheritance on all signaling semaphores
Heesub Shin [Thu, 6 Apr 2017 01:48:41 +0000 (10:48 +0900)]
drivers: disable priority inheritance on all signaling semaphores

Disable priority inheritance on all semaphores used for signaling.

Change-Id: Id395323d2856a20139c142daa7683d1a933fb877
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Shin: backported 4fcbe8e41 from NuttX]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agodrivers/serial: disable priority inheritance on some semaphores
Heesub Shin [Thu, 6 Apr 2017 01:19:54 +0000 (10:19 +0900)]
drivers/serial: disable priority inheritance on some semaphores

Make sure that priority inheritance is not enabled for the signaling
semaphores used in the serial driver.

Change-Id: Icab16a77b5370016f6cadf2f29853164511dc41d
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Shin: backported 47b043df from NuttX]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agokernel/semaphore: add macros for sem_get/setprotocol()
Heesub Shin [Thu, 6 Apr 2017 01:11:40 +0000 (10:11 +0900)]
kernel/semaphore: add macros for sem_get/setprotocol()

Provide macros for sem_setprotocol() and sem_getprotocol() if priority
inheritance is not enabled. More SEM_PRIO_* definitions to
include/tinyara/semaphore.h.

All credits should go to Gregory Nutt who wrote the original patch.

Change-Id: Id0f931210629e5b15db5c659b914794662f04adc
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Shin: backported 97bf82ee from NuttX]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agokernel/semaphore: move non-standard prototype
Heesub Shin [Thu, 6 Apr 2017 00:59:58 +0000 (09:59 +0900)]
kernel/semaphore: move non-standard prototype

Move prototypes for the non-standard include/semaphore.h file to the
non-standard include/tinyara/semaphore.h with the other non-standard
semaphore interfaces.

All credits should go to Gregory Nutt who wrote the original patch.

Change-Id: I970391b2a3510279e964db3cce2345a5db91f8eb
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Shin: backported d5b4d848 from NuttX]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agokernel/semaphore: update some comments on nsem_inode_s
Heesub Shin [Thu, 6 Apr 2017 00:51:43 +0000 (09:51 +0900)]
kernel/semaphore: update some comments on nsem_inode_s

Add more description on some field of struct nsem_inode_s.

Change-Id: Icb3f2fbaeba400a163787430c145c8b47586ff13
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Shin: backported 6c51544e from NuttX]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agokernel/semaphore: move sem_getprotocol() to libc
Heesub Shin [Thu, 6 Apr 2017 00:47:32 +0000 (09:47 +0900)]
kernel/semaphore: move sem_getprotocol() to libc

sem_getprotocol() can be in C library. Backported from NuttX. All
credits should go to Gregory Nutt.

Change-Id: Ic0725f246acaef3839142a460f5713c9fda4fdec
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Shin: backport b738a646a from upstream]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agokernel/semaphore: add new APIs for priority inheritance
Heesub Shin [Thu, 6 Apr 2017 00:31:18 +0000 (09:31 +0900)]
kernel/semaphore: add new APIs for priority inheritance

This commit introduces new APIs, pthread_mutexattr_get/set_protocol and
non-standard sem_get/set_protocol, which allow to enable or disable
priority inheritance on a single semaphore. Backported from NuttX. All
credits should go to Gregory Nutt who wrote the original patch.

Change-Id: I05c62a6a4ee6fbdb00b0478bf8ef8cfe44487f92
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Shin: backported 92d30224 from the upstream]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agokernel/semaphore: add a new internal interface sem_reset()
Heesub Shin [Thu, 6 Apr 2017 02:42:57 +0000 (11:42 +0900)]
kernel/semaphore: add a new internal interface sem_reset()

Add an internal interface to reset a semaphore count.

Change-Id: I7d443a80833f06fd20e9baa200122a43569d4e8d
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Shin: backported 5d63cd85 from NuttX]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agonetdb/dns: increase the response buffer size
Jin-Seong Kim [Fri, 7 Apr 2017 10:20:52 +0000 (19:20 +0900)]
netdb/dns: increase the response buffer size

Some DNS response has lots of canonical name. In this case, hostname
cannot be resolved due to insufficient size of DNS response message
buffer. To prevent DNS hostname resolving issue, increase DNS response
buffer size from 95 to 512.

Change-Id: I6aa269fe305753aba18c7b6bd275e5fc2bd2be03
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agoapps: add the dnsclient_test as an example application
Jin-Seong Kim [Fri, 7 Apr 2017 10:13:44 +0000 (19:13 +0900)]
apps: add the dnsclient_test as an example application

This commit is initial commit to support dnsclient test example

Change-Id: I6e1dc5f4132f799c00df3cedfff88ed698f52405
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agonetutils/webclient: seperate wget_base()
Junyeon LEE [Fri, 7 Apr 2017 09:38:59 +0000 (18:38 +0900)]
netutils/webclient: seperate wget_base()

This commit seperates wget_base() to 3 parts for readabilty.

Change-Id: I2eb1a62852c76cf7cc488260deb8f0da9b546b21
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agoapps/system: fix trivial typo in Kconfig
EunBong Song [Fri, 7 Apr 2017 08:00:09 +0000 (17:00 +0900)]
apps/system: fix trivial typo in Kconfig

CONFIG_NET_LWIP should be changed to NET_LWIP.

Change-Id: I73629f713c5a04f3b949a67f9407862a48a6841b
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agoartik053: initialize pwm at boot
Junhwan Park [Tue, 4 Apr 2017 12:40:36 +0000 (21:40 +0900)]
artik053: initialize pwm at boot

Initialize PWMs at board_initialize().

Change-Id: Ie399cc97bc2233c17318057594711c3e5c44614b
Signed-off-by: Junhwan Park <junhwan.park@samsung.com>
7 years agoartik053: export GPIO pins at boot
Junhwan Park [Tue, 4 Apr 2017 12:27:10 +0000 (21:27 +0900)]
artik053: export GPIO pins at boot

Export GPIO pins that are actually supported on the ARTIK-053 starter
kit.

Change-Id: Ie06626bb89513f8b90d7f9d07acc33c1b4fcb0d6
Signed-off-by: Junhwan Park <junhwan.park@samsung.com>
7 years agoapps/examples: add an application for sensor board
Junhwan Park [Tue, 4 Apr 2017 12:04:58 +0000 (21:04 +0900)]
apps/examples: add an application for sensor board

This patch adds an example application for the sensor board expansion to
the ARTIK-053 starter kit. It is only for internal development and
verification, testing external peripheral IPs.

Change-Id: Ie8c1aee7a8295bc927ff0a498838361b4d886af4
Signed-off-by: Junhwan Park <junhwan.park@samsung.com>
7 years agoapps/testcase: fix a link error
EunBong Song [Thu, 6 Apr 2017 07:57:04 +0000 (16:57 +0900)]
apps/testcase: fix a link error

This patch fixes a link error below:

    make[2]: Leaving directory `/home/ebsong/tizenrt/os/arch/arm/src/sidk_s5jt200/src'
    LD: tinyara
    /home/ebsong/tizenrt/os/../build/output/libraries/libapps.a(tc_tash_stackmonitor.o): In function `tc_tash_stackmonitor':
    /home/ebsong/tizenrt/apps/examples/testcase/le_tc/kernel/tc_tash_stackmonitor.c:64: undefined reference to `TC_ASSERT_EQ'
    /home/ebsong/tizenrt/apps/examples/testcase/le_tc/kernel/tc_tash_stackmonitor.c:68: undefined reference to `TC_SUCCESS_RESULT'

Change-Id: If6a7d19886cae779112b4b2165673d0547b6316a
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agoapps/testcase: fix compilation warning
EunBong Song [Thu, 6 Apr 2017 07:49:17 +0000 (16:49 +0900)]
apps/testcase: fix compilation warning

This patch fixes a compilation warning below:

    le_tc/kernel/tc_tash_heapinfo.c: In function 'tc_tash_heapinfo':
    ./tc_common.h:61:3: error: 'return' with no value, in function returning non-void [-Werror=return-type]
       return; \
       ^
    le_tc/kernel/tc_tash_heapinfo.c:84:2: note: in expansion of macro 'TC_ASSERT_EQ'
       TC_ASSERT_EQ("pthread_create", ret, OK);

Change-Id: Iabba8b1c44d57b26b2b4ea067495cca773c3251d
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agoexternal/wakaama: add an lwm2m client application
Jin-Seong Kim [Fri, 7 Apr 2017 00:18:35 +0000 (09:18 +0900)]
external/wakaama: add an lwm2m client application

This commit is initial commit to support lwm2mclient example
 - lwm2mclient callback function for pthread is changed to lwm2m_client_run
 - to support arguments comes from pthread, add lwm2m_client_input structure

Change-Id: Ica1e930ec49c084e24e1af32ee750c35a0dfe3ac
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agoexternal: introduce wakaama
Jin-Seong Kim [Thu, 6 Apr 2017 01:45:46 +0000 (10:45 +0900)]
external: introduce wakaama

This commit is an initial commit to support lwm2m through wakaama[1].

[1] https://github.com/eclipse/wakaama

Change-Id: I615b4ef26a7baba86d492776f13a10e1be84003d
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agos5j: remove all CONFIG_S5J_FLASH_XXX
Heesub Shin [Fri, 7 Apr 2017 08:25:05 +0000 (17:25 +0900)]
s5j: remove all CONFIG_S5J_FLASH_XXX

CONFIG_S5J_FLASH_XXX should not be used. Those definitions are
pretending as they are configurable, but definitely not. For example,
the base address of flash region is constant, not configurable. This
makes people very confused and should be fixed.

Change-Id: Ica687298da211e1c5b0944a053f285f2a711f7bc
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/sss: do not use Kconfig constants
Heesub Shin [Fri, 7 Apr 2017 08:20:55 +0000 (17:20 +0900)]
s5j/sss: do not use Kconfig constants

Instead of using constants that are defined by Kconfig, use geometry
information provided by underlying MTD device.

This is a prepration step for removing CONFIG_S5J_FLASH_XXX that are not
actually configurable, but in Kconfig so making people confused.

Change-Id: I02dd1e39e8e642a0eceeda72e217b5a7b376f85b
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j: add constant definitions of memory regions
Heesub Shin [Fri, 7 Apr 2017 07:51:51 +0000 (16:51 +0900)]
s5j: add constant definitions of memory regions

This commit adds memory map constants that defines the base addresses
and sizes of each memory region in S5J.

Change-Id: Ida674263f8ccf89c7511eed65ddd90602089ac25
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j: fix trivial typo in Kconfig
EunBong Song [Thu, 6 Apr 2017 04:29:23 +0000 (13:29 +0900)]
s5j: fix trivial typo in Kconfig

S5J_FLASH_SIZE and S5J_BOOTLOADER_REGION_SIZE are bytes unit, so Kconfig
entries should be changed to byte-unit.

Change-Id: I25ded972c5583328c0ec6d1b95455f77aecbfd15
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agos5j/sflash: fix compilation error when CONFIG_MTD_PROGMEM is not set
EunBong Song [Thu, 6 Apr 2017 01:29:09 +0000 (10:29 +0900)]
s5j/sflash: fix compilation error when CONFIG_MTD_PROGMEM is not set

This patch fixes a compilation error at s5j_sflash_init() when
CONFIG_MTD_PROGMEM is disabled, but CONFIG_S5J_SFLASH.

Change-Id: I173cd4a500b2817ed73bf441e38ebb65bff53e96
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agonetutils/webserver: fix potential memory leak
Junyeon LEE [Fri, 7 Apr 2017 03:48:07 +0000 (12:48 +0900)]
netutils/webserver: fix potential memory leak

When webserver receives a websocket packet, it generates websocket
handler for processing the packet and inherits its own context. In this
process, mbedtls network file descriptor (fd) context was not inherited
properly and changed it. Because of this problem, the websocket client
handler thread cannot be released sometimes.

Change-Id: I9e70bd506a61091f442e8da8e18c62400b1bb211
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agonet/tls: fix a potential security hole that bypasses signature verification
Junyeon LEE [Thu, 6 Apr 2017 13:19:41 +0000 (22:19 +0900)]
net/tls: fix a potential security hole that bypasses signature verification

This commit fixes a critical issue about ECDH_ANON key-exchange. When
MBEDTLS_KEY_EXCHANGE_ECDH_ANON_ENABLED is enabled, TLS client could
bypass the signature verification and it would makes security hole.

Change-Id: I6123552ab3e899919a6fc046a5c4600a3d1b9ca2
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agonet/tls: fix log flooding and data aborts
Junyeon LEE [Thu, 6 Apr 2017 08:12:22 +0000 (17:12 +0900)]
net/tls: fix log flooding and data aborts

This commit fixes two minor tls issues:
 . Log flooding when CONFIG_HW_DH_PARAM is enabled
 . Data abort at security APIs when called before see_init()

Change-Id: Ied77bc66adc732b21c472a9005fb28fe3eb421e3
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agosidk_s5jt200: revise cmm scripts to flash SSS f/w
Junyeon LEE [Thu, 6 Apr 2017 07:23:08 +0000 (16:23 +0900)]
sidk_s5jt200: revise cmm scripts to flash SSS f/w

SSS firmware will be flashed to the following target address:
 . sss_FW_FLASH_START : 0x04040000 + MIRROR_OFFSET
 . sss_FW_FLASH_SIZE : 32KB

Change-Id: Iad56d535e183873636fe41fa2334cc93f88739ee
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agos5j/sss: move isp driver headers and library directory
Junyeon LEE [Wed, 5 Apr 2017 06:40:07 +0000 (15:40 +0900)]
s5j/sss: move isp driver headers and library directory

This patch moves isp driver headers and library from /soc/sss to /sss.

Change-Id: I104318b3d7d57efed4d5fd482101079c29783009
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agoapps/netutils: remove all unused source code
Junyeon LEE [Wed, 5 Apr 2017 02:07:56 +0000 (11:07 +0900)]
apps/netutils: remove all unused source code

Now that the CONFIG_HW_RSA has been dropped, this commit removes all
code lines related with it from various network components including
webserver, webclient, and MQTT.

Change-Id: I74da1b12faf567cafe3f2a28fc985b335127316e
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agonet/tls: remove unused security apis
Junyeon LEE [Tue, 4 Apr 2017 06:07:26 +0000 (15:07 +0900)]
net/tls: remove unused security apis

This commit removes all unused security apis and HW_RSA_SIGN
configuration.

Change-Id: Ia301f1738152bb054f518365d20c94e2c5f6ed7e
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agoapps, netcmd: remove unnecessary config check
EunBong Song [Wed, 5 Apr 2017 01:28:54 +0000 (10:28 +0900)]
apps, netcmd: remove unnecessary config check

netcmds does many extra config checks. This patch removes all
unnecessary config checks.

Change-Id: I237a347cc576f26fefe13402e3684f00d4968612
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agonet: NET_IPv4 should be selected when NET_LWIP is enabled
EunBong Song [Wed, 5 Apr 2017 01:18:18 +0000 (10:18 +0900)]
net: NET_IPv4 should be selected when NET_LWIP is enabled

When NET_LWIP is enabled, it support basic IPv4 functions.
So, it does not make sense can disable NET_IPv4 even if NET_LWIP is enabled.
This patch removes NET_IPv4 Kconfig menu and to be selected when NET_LWIP
is enabled.

Change-Id: Ic7763eaf335b0acba9346b3d598adbb6bb0e45bb
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agoartik053: add netif flags on wlan_init()
Jin-Seong Kim [Tue, 4 Apr 2017 05:30:12 +0000 (14:30 +0900)]
artik053: add netif flags on wlan_init()

This commit is to add netif flags for lwIP stack to handle ARP,
Broadcast and IGMP multicast packets, those flags should be configured
on netif

Change-Id: I1b97377aea317649200c507526eacae183fc3ce1
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agonet: remove NET_ARCH_CHKSUM
EunBong Song [Tue, 4 Apr 2017 05:29:09 +0000 (14:29 +0900)]
net: remove NET_ARCH_CHKSUM

NET_ARCH_CHKSUM is a Nuttx uIP legacy feature and not used anymore.
This patch removes all related codes with NET_ARCH_CHKSUM.

Change-Id: Ia8e033e95c72731466efb63561fea41c30545b79
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agonet: remove NET_ARCH_INCR32
EunBong Song [Tue, 4 Apr 2017 05:05:38 +0000 (14:05 +0900)]
net: remove NET_ARCH_INCR32

NET_ARCH_INCR32 is a Nuttx uIP legacy feature and not used anymore.
This patch removes all related codes with NET_ARCH_INCR32.

Change-Id: Iee50bae2abbd93a754e9ea1fb653400c34c22874
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agoapps/examples: add an example for testing /dev/eeprom
Ivan [Mon, 3 Apr 2017 14:05:50 +0000 (23:05 +0900)]
apps/examples: add an example for testing /dev/eeprom

Test code performs write/read operation with onboard EEPROM.

Change-Id: I50b1c45d6ce17cf9b74f2f187ea6ca886f712e0f
Signed-off-by: Ivan <ivan.galkin@samsung.com>
7 years agosidk_s5jt200: add to support on-board eeprom
Ivan [Mon, 3 Apr 2017 13:59:55 +0000 (22:59 +0900)]
sidk_s5jt200: add to support on-board eeprom

On SIDK board there is a MicroWire EEPROM.

In order to use it driver is implemented. Driver is based on bitbang SPI
emulation, since T200 SPI does not support non 8 bit aligned transfers,
used by EEPROM.

To enable driver, in make menuconfig enable next options:

Device Drivers  --->
[*] SPI Driver Support  --->
[*]   SPI bit-bang device
[*]     SPI bit-bang variable width transfers

Board Selection  --->
[*] Support M93C66WMN6T EEPROM

Change-Id: Ia3ecf868f207866b6f19590a0e9a2900d18c1340
Signed-off-by: Ivan <ivan.galkin@samsung.com>
7 years agodrivers/spi: fix compilation errors
Ivan [Tue, 4 Apr 2017 04:33:30 +0000 (13:33 +0900)]
drivers/spi: fix compilation errors

This commit fixes a compilation error when CONFIG_SPI_BITBANG_VARWIDTH
is set to '=y'.

Change-Id: I8c5eb89cddb588571744d0f7d87670b037c3547c
Signed-off-by: Ivan <ivan.galkin@samsung.com>
7 years agospi: iotbus: fix mismatched prototype declarations
Heesub Shin [Tue, 4 Apr 2017 04:29:37 +0000 (13:29 +0900)]
spi: iotbus: fix mismatched prototype declarations

SPI operations .setmode and .setbits return void. Every callsites
that expect those will return an integer should be fixed also.

Change-Id: I1ee20d89f2777b193e5eac3831f9e3c004868209
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agoRevert "spi: remove spi_bitbang.c under /include/..."
Heesub Shin [Tue, 4 Apr 2017 02:37:25 +0000 (11:37 +0900)]
Revert "spi: remove spi_bitbang.c under /include/..."

This reverts commit bffd43626b62879538cf739ecb8f7583318d899f.

7 years agospi: remove spi_bitbang.c under /include/...
Heesub Shin [Tue, 4 Apr 2017 02:18:01 +0000 (11:18 +0900)]
spi: remove spi_bitbang.c under /include/...

Why is spi_bitbang.c under '/include/tinyara/spi'?

Change-Id: Id6ba686b7162f645ecec95035be1ecb367766b2e
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agofs/vfs: return ERROR when ioctl is not implemented
EunBong Song [Mon, 3 Apr 2017 02:36:38 +0000 (11:36 +0900)]
fs/vfs: return ERROR when ioctl is not implemented

VFS layer should return ERROR when the underlying file system
implementation does not provide .ioctl callback.

Change-Id: If2043070f2c63b9f560856c56f89b353b343abf7
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agonet: remove NET_NOINTS
EunBong Song [Mon, 3 Apr 2017 06:23:00 +0000 (15:23 +0900)]
net: remove NET_NOINTS

NET_NOINTS is a Nuttx uIP legacy knob which determines which
synchronization method is used for network layer. If it is disabled,
interrupts are masked when synchronization is needed. Otherwise,
semaphore is used.

However, in the current implementation, network related function could
not be called in the interrupt context. This means that NET_NOINTS
should be '=y'.

This patch removes NET_NOINTS, and enables it always, so that only
semaphore is used for network layer syncrhonization.

Change-Id: I1dbab2216bd3c1c62b20fc70c653e9129742a163
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agos5j/rtc: separate out register definitions
Heesub Shin [Mon, 3 Apr 2017 11:25:23 +0000 (20:25 +0900)]
s5j/rtc: separate out register definitions

S5JT200-specific RTC registers and bit-field definitions are moved to
chip/s5jt200_rtc.h.

Change-Id: I3a4b180b6221bac086e1417e1864a3cf8229694f
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j: clean up headers
Heesub Shin [Mon, 3 Apr 2017 10:36:33 +0000 (19:36 +0900)]
s5j: clean up headers

This commit rearranges chip-specific definitions that are scattered
around under arch/arm/src/s5j.

Change-Id: Iefd69d0fc70b75d0aa757369d2134514bf7affc2
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j: remove s5j_gpio/memorymap.h
Heesub Shin [Mon, 3 Apr 2017 09:40:08 +0000 (18:40 +0900)]
s5j: remove s5j_gpio/memorymap.h

soc/s5j_gpio.h and soc/s5j_memorymap.h is not in use. Remove them.

Change-Id: I0e96543da9602997b8268709107cf35166dd4069
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j: clean up unnecessary headers
Heesub Shin [Mon, 3 Apr 2017 09:06:22 +0000 (18:06 +0900)]
s5j: clean up unnecessary headers

This commit removes all unnecessary header files in S5J.

Change-Id: I9bcd7c7ad85e1c1192e5b93df77c16a403896e27
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j: move s5j_watchdog.h
Heesub Shin [Mon, 3 Apr 2017 08:58:49 +0000 (17:58 +0900)]
s5j: move s5j_watchdog.h

s5j_watchdog.h is in wrong directory and should be moved to under
/os/arch/arm/src/s5j.

Change-Id: I07e16d76a0bcaf2d7702e1fdd24d0e956682b7c2
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j: rename s5jt200_irq.h to irq.h
Heesub Shin [Mon, 3 Apr 2017 08:52:53 +0000 (17:52 +0900)]
s5j: rename s5jt200_irq.h to irq.h

There is no point in having s5jt200_irq.h under
'arch/arm/include/s5j/soc/'. Let's rename it and move to
'arch/arm/include/s5j/'.

Change-Id: Id35acb6a1785d7103baf7ae010deba1650b92f8e
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j: do not use custom types
Heesub Shin [Mon, 3 Apr 2017 08:41:51 +0000 (17:41 +0900)]
s5j: do not use custom types

This commit replaces every usage of custom types in S5J with standard
types. For example, 'u32' and 'cycle_t' can be replaced with uint32_t
and unsigned long long respectively.

Change-Id: Ie2ad22aac1552188c67d1ddfdd78d1d62a4b0ad9
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j: use get/putreg32 when acceessing SFR
Heesub Shin [Mon, 3 Apr 2017 08:35:17 +0000 (17:35 +0900)]
s5j: use get/putreg32 when acceessing SFR

This commit replaces all usages of HW_REG32() and __raw_read/writel()
macro with get/putreg32() for better readability and consistency. This
commit alters quite a lot, but does not make functional differences.

Change-Id: I9a3646737efd5ab7cc4e7e5d9ccffbb6b0402954
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j: remove nvram.h
Heesub Shin [Mon, 3 Apr 2017 05:30:08 +0000 (14:30 +0900)]
s5j: remove nvram.h

It seems that nvram.h was accidentally created under /os/include/s5j.

Change-Id: Ied1c684e2cf57fee4cb107ffaf20128dbd2ba52e
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agodrivers/net/telnet: fix memory leak
Wonsang Ryou [Mon, 3 Apr 2017 00:25:57 +0000 (09:25 +0900)]
drivers/net/telnet: fix memory leak

This patch fixes the memory leak in telnet_session().

Change-Id: Ie2156630faaa973a13d06ad0cc638d3db5f4cfef
Signed-off-by: Wonsang Ryou <wonsang.yoo@samsung.com>
7 years agoartik053: remove RTC related configurations
Heesub Shin [Mon, 3 Apr 2017 03:53:42 +0000 (12:53 +0900)]
artik053: remove RTC related configurations

Now that CONFIG_S5J_RTC_* have been removed, defconfig in ARTIK-053 also
should be cleaned up.

Change-Id: I1f18a885df684a9fa8a4170824ceeefbf234eea3
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agoartik053: register RTC driver at boot
Heesub Shin [Mon, 3 Apr 2017 04:41:39 +0000 (13:41 +0900)]
artik053: register RTC driver at boot

This commit registers the RTC device driver at boot, so that the RTC
device can be exported through /dev/rtc0. This allows users to open and
then use various operations with it on application space. This change
takes effects only when the upper-half RTC driver is enabled.

Change-Id: I7215251dafba93544485a58ef49d2aa7503c7fbf
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: remove RTC related configurations
Heesub Shin [Mon, 3 Apr 2017 03:55:18 +0000 (12:55 +0900)]
sidk_s5jt200: remove RTC related configurations

Now that CONFIG_S5J_RTC_* have been removed, defconfig in SIDK S5JT200
also should be cleaned up.

Change-Id: Ibb0a4057331511af1e4b9bd1a826e980d5c3ad2b
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: register RTC driver at boot
Heesub Shin [Mon, 3 Apr 2017 02:48:43 +0000 (11:48 +0900)]
sidk_s5jt200: register RTC driver at boot

This commit registers the RTC device driver at boot, so that the device
node can be exported through /dev/rtc0. This allows users to open it and
then use various operations with it at user-level applications.

Change-Id: Ie8748d8edf177ab485de6e65b8564bfe4c526480
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j: drop mct driver
Heesub Shin [Mon, 3 Apr 2017 02:07:24 +0000 (11:07 +0900)]
s5j: drop mct driver

Now that the OS time tick is generated by RTC, MCT is not in use. As we
have plan to completely rewrite it, let's drop it temporarily.

Change-Id: Ib5806a040184583b0df9e5eafea247c6bde02f23
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/timerisr: use RTC as an OS time tick
Heesub Shin [Mon, 3 Apr 2017 00:18:44 +0000 (09:18 +0900)]
s5j/timerisr: use RTC as an OS time tick

Using the MCT as an OS systick timer by reserving a local timer seems
overkill. For such purpose, S5J provides the RTC tick counter and using
using it seems more appropriate. This commit configures it as an OS time
tick instead of MCT local timer.

This is a preparation step for redesigning the MCT driver. It does not
introduce any functional differences except changing the tick source.

Change-Id: Ic0f9a20c7d10fee7451c2c0a5857af6c19b07fbf
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/rtc: rework rtc driver
Heesub Shin [Mon, 3 Apr 2017 00:16:45 +0000 (09:16 +0900)]
s5j/rtc: rework rtc driver

This commit completely rewrites the RTC driver. Unnecessary code lines
were removed and overcall callflow were designed, following the
conventions at upstream.

As a result, overall binary footprint reduced, when CONFIG_RTC_ALARM=n:

    Before
       text    data     bss     dec filename
       1736       4       1    1741 s5j_rtc.o

    After
       text    data     bss     dec filename
       1248       0       1    1249 s5j_rtc.o
        108       4       0     112 s5j_rtc_lowerhalf.o

Change-Id: Ic641828546827cdff51f8bbf2ee05eb3f501ac88
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agodrivers/rtc: sync with the lastest NuttX
Heesub Shin [Sun, 2 Apr 2017 08:46:13 +0000 (17:46 +0900)]
drivers/rtc: sync with the lastest NuttX

RTC subsystem (drivers/rtc.c and related header files) in TinyARA seems
to be outdated, so it is hard to write the lower-half driver for it.
This commit updates the RTC subsystem of TinyARA with the lastest NuttX,
which looks well-structured.

This commit mainly updates the source code that is related with RTC and
does not introduce any functional differences.

Change-Id: If622b1c82c645103e43da79d3c48c56e7523d1e7
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: do not use CONFIG_RTC_BASE_YEAR
Heesub Shin [Mon, 3 Apr 2017 02:31:56 +0000 (11:31 +0900)]
sidk_s5jt200: do not use CONFIG_RTC_BASE_YEAR

CONFIG_RTC_BASE_YEAR will be removed, so do not use it. .tm_year field
of 'struct tm' is a relative value to 1900. Here, '1900' is not actually
configurable.

Change-Id: I607ffc85f33dbba732463371ed3fa1e1db0c2de3
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j: remove unused kconfig entry for tick counter
Heesub Shin [Wed, 29 Mar 2017 07:08:24 +0000 (16:08 +0900)]
s5j: remove unused kconfig entry for tick counter

This commit removes a Kconfig entry for the tick counter that is not
implemented at this momment.

Change-Id: I6022ce26a5465b6802398517c125928b21466c5a
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/gpio: use heap-memory for s5j_gpio_all array
EunBong Song [Fri, 31 Mar 2017 08:23:36 +0000 (17:23 +0900)]
s5j/gpio: use heap-memory for s5j_gpio_all array

If all gpio is not used, s5j_gpio_all array uses extra memory.
This patch changes s5j_gpio_all to use heap memory so that allocate
memory only as needed.

Change-Id: I677b941702a961592e096b7de221ce0b46424c16
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agolibc/netdb: fix memory leak in freeaddrinfo()
Wonsang Ryou [Fri, 31 Mar 2017 07:27:35 +0000 (16:27 +0900)]
libc/netdb: fix memory leak in freeaddrinfo()

This patch fixes the memory leak problem in freeaddrinfo().

In freeaddrinfo(), ai->ai_canonname is not freed even if it is
allocated by getaddrinfo(). So it will cause memory leak.

Change-Id: Iede7ad7380f92db07fc1e581984557ebea3d308e
Signed-off-by: Wonsang Ryou <wonsang.yoo@samsung.com>
7 years agonetutils/mqtt: remove an unused variable
Wonsang Ryou [Fri, 31 Mar 2017 08:42:15 +0000 (17:42 +0900)]
netutils/mqtt: remove an unused variable

This patch removes an unused variable in mosquitto.c.

Change-Id: Ifd130ec2cf0ac231ed159cc071e0d9fcca1010b0
Signed-off-by: Wonsang Ryou <wonsang.yoo@samsung.com>
7 years agos5j/sss: supports SSSRO read()
Junyeon LEE [Wed, 29 Mar 2017 07:22:17 +0000 (16:22 +0900)]
s5j/sss: supports SSSRO read()

This commit supports read and write function for SSSRO mtdftl.
And adds sss_driver_io.c file for portability

Change-Id: Iacb463c138e19955c990a4a7cc69715cff7f6d05
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agodrivers: fix invalid Kconfig statement
Heesub Shin [Fri, 31 Mar 2017 04:29:29 +0000 (13:29 +0900)]
drivers: fix invalid Kconfig statement

Unlike NuttX, CONFIG_TIMER is not a menuconfig entry in TizenRT. So,
s/menuconfig TIMER/config TIMER/.

Change-Id: I1a139ee6da705b7867bc17f282f1193e11d1997e
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agodrivers/timer: backport the latest upper-half driver
Heesub Shin [Fri, 31 Mar 2017 04:04:42 +0000 (13:04 +0900)]
drivers/timer: backport the latest upper-half driver

The upper-half timer drvier has been left abandoned in TizenRT, though
there were many changes at upstream. This commit backports the latest
upper-half driver of timer from NuttX, so that users can implement
their lower-half driver more easily.

This commit is introducing huge changes, but it does not cause any harm
because in TizenRT there is no lower-half timer driver or user
application based on it.

All credits should go to many other contributors who wrote the original
commits for NuttX. Sorry for not listing their names here.

Change-Id: Ib57c1ac259d4c1163c42ac3b08a25bf59a2fa2dc
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agoirq/dispatch: add argument ptr to irq_dispatch()
Heesub Shin [Thu, 30 Mar 2017 11:02:56 +0000 (20:02 +0900)]
irq/dispatch: add argument ptr to irq_dispatch()

This commit adds a parameter to the interrupt handler for passing
private data to it, so that users can pass additional information to
their callback. This makes drivers that register irq handlers much
simpler than before. It seems to alter quite a lot, but this commit
itself does not inroduce any functional differences at all.

All credits should go to Mark Schulte who wrote the original patch for
NuttX.

Change-Id: Id22891b0f85646e8a2e86a7d4c8463bd8e67cd37
Signed-off-by: Mark Schulte <mark@mjs.pw>
[Shin: back-ported from the latest NuttX version]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: add to support S8300 IC
Jihoon Park [Fri, 31 Mar 2017 11:38:18 +0000 (20:38 +0900)]
sidk_s5jt200: add to support S8300 IC

SIDK S5JT200 evaluation board has S8300 IC which regulates LED
brightness through pulse width modulation (PWM) inputs.

Change-Id: I667279d242716ca8b3cd566a93a0a48cfe61fa34
Signed-off-by: Jihoon Park <jh6186.park@samsung.com>
7 years agos5j/pwm: rework pwm driver
Jihoon Park [Fri, 31 Mar 2017 11:36:15 +0000 (20:36 +0900)]
s5j/pwm: rework pwm driver

fix prefix for s5j, functions are named as s5j_pwm_xxx. SFR access uses
getreg/putreg. sidk_s5jt200 board initializes pwm channels accordingly
for board definition. It has 6 PWM output and 3 s8300 driver exsited on
sidk s5jt200 evaludation board.

pwm functions except s5j_pwminitialize names with staic and not appears
lower half and upper half.

FAR struct pwm_lowerhalf_s *foo;
foo->ops->start() is allowed to access PWM functionalities.

Change-Id: I120284b114f9994ec96e100809975b0e17823fa7
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/i2c: use lldbg() instead of dbg() macro
Jihoon Park [Tue, 28 Mar 2017 08:42:34 +0000 (17:42 +0900)]
s5j/i2c: use lldbg() instead of dbg() macro

Use lldbg() instead of dbg(), and remove unnecessary log outputs.

Change-Id: I7bc9ba65928acb3b8a00a6e051290c483eeb32fb
Signed-off-by: Jihoon Park <jh6186.park@samsung.com>
7 years agosidk_s5jt200: fix file prefix to s5jt200 instead of s5j
Jihoon Park [Tue, 28 Mar 2017 04:39:00 +0000 (13:39 +0900)]
sidk_s5jt200: fix file prefix to s5jt200 instead of s5j

the file name rule under sidk_s5jt200 will be s5jt200 as chip name, s5j
_buttons.c file name is fixed to s5jt200_buttons.c

Change-Id: I6b38b50c41f3bbebb5812a5f50b1187849fa3d95
Signed-off-by: Jihoon Park <jh6186.park@samsung.com>
7 years agos5j/sss: update sss static library
Junyeon LEE [Wed, 29 Mar 2017 06:43:30 +0000 (15:43 +0900)]
s5j/sss: update sss static library

This commit is only for supporting read SSSRO region over mtdftl.

Change-Id: I7840807452b87ae0b9fefe15b8147f462af90d25
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agomm: fix memory overhead when realloc fallbacks to malloc
EunBong Song [Wed, 29 Mar 2017 01:35:33 +0000 (10:35 +0900)]
mm: fix memory overhead when realloc fallbacks to malloc

When realloc() has to fall back to calling malloc(), size including
overhead was being provided to malloc(), causing a slightly larger
allocation than needed. Noted by initialkjc@yahoo.com

Change-Id: Ic9cb32d8e7ef82f431447e1a58b3e86f8bf9a789
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Song: back-ported 0064dc52e from the NuttX upstream]
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agonetutils/er-coap: fix coding style issues
Jin-Seong Kim [Tue, 28 Mar 2017 04:36:42 +0000 (13:36 +0900)]
netutils/er-coap: fix coding style issues

This commit fixes coding style of er-coap library.

Change-Id: If42e53816334eff559d59036aee8c5f692c46f1a
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agonetutils/er-coap: add to support TCP/TLS as per the RFC
Jin-Seong Kim [Mon, 20 Mar 2017 06:26:39 +0000 (15:26 +0900)]
netutils/er-coap: add to support TCP/TLS as per the RFC

RFC reference : https://tools.ietf.org/html/draft-ietf-core-coap-tcp-tls-02
 - patch is available from https://github.com/artikcloud/artikcloud-lwm2m-c
 - Author: Gregory Lemercier <g.lemercier@samsung.com>

Implementation required the following modifications:
 - Passing the token as an argument to the registration frame
 - Implementation of the "nibble" variable length header in CoAP
   for TCP as detailed in the current draft of the specification.
   Note that this might change later as the RFC undergoes changes

Change-Id: Ie94defbc30272c6a1e88c09dc246ebfd09d3bb48
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agosidk_s5jt200: added tlc59116 LED IC driver
Jihoon Park [Tue, 28 Mar 2017 01:44:27 +0000 (10:44 +0900)]
sidk_s5jt200: added tlc59116 LED IC driver

tlc59116 generates PWM signal and control RGB LED, sidk_s5jt200 has
this LED driver IC and connects with I2C interface.

sidk_s5jt200 board turns on 4 RGB LED after reset.

Change-Id: I0c965ed021ca4ac7f6a7aad8c3a779546fc0b701
Signed-off-by: Jihoon Park <jh6186.park@samsung.com>
7 years agos5j/i2c: use get/putreg instead of __raw_readl/writel
Jihoon Park [Mon, 27 Mar 2017 11:32:52 +0000 (20:32 +0900)]
s5j/i2c: use get/putreg instead of __raw_readl/writel

__raw_readl to getreg32
__raw_writel to putreg32
HW_REG32 to
 reg = getreg32(a);
 reg with expression;
 putreg32(reg, a);

Change-Id: I87215c308a70001e60124a7e9d4d00348e29400b
Signed-off-by: Jihoon Park <jh6186.park@samsung.com>
7 years agosidk_s5jt200: enable i2c
Jihoon Park [Mon, 27 Mar 2017 12:03:53 +0000 (21:03 +0900)]
sidk_s5jt200: enable i2c

Enable I2C for all sidk_s5jt200 configs.

Change-Id: I18dea05c4f20e9ff3a89670b4b0077116430bf62
Signed-off-by: Jihoon Park <jh6186.park@samsung.com>
7 years agos5j/i2c: tidy up i2c driver
Jihoon Park [Mon, 27 Mar 2017 12:02:50 +0000 (21:02 +0900)]
s5j/i2c: tidy up i2c driver

Removed unused function and comments.

Change-Id: Id8424f2ff3b583f2f9a2de6be5ba45bd56a520ec
Signed-off-by: Jihoon Park <jh6186.park@samsung.com>
7 years agonet/netdev: support SIOCGLIFMTU and SIOCGIFMTU ioctls
Jin-Seong Kim [Mon, 27 Mar 2017 08:02:22 +0000 (17:02 +0900)]
net/netdev: support SIOCGLIFMTU and SIOCGIFMTU ioctls

This commit fixes netdev_ifrioctl() so that it can handle SIOCGLIFMTU
and SIOCGIFMTU ioctls properly, which returns MTU sizes.

Change-Id: I07f044e4bc69c5b538d9acde77120f00774df0f9
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agonetutils/dhcpd: specify port number when binding the socket
Jin-Seong Kim [Mon, 27 Mar 2017 07:59:32 +0000 (16:59 +0900)]
netutils/dhcpd: specify port number when binding the socket

This commit is to patch for specifying port number of dhcp server when
binding the socket. If there is no port number specified, DHCP packets
have wrong port number and this may cause interoperability problems
during DHCP handshaking with various other platforms.

Change-Id: Ife196fd1a524b2f3b4a0e1157ca28910d47ee8fd
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agos5j/rtc: cleanup RTC code
Ivan [Mon, 27 Mar 2017 16:55:37 +0000 (01:55 +0900)]
s5j/rtc: cleanup RTC code

RTC code cleaned, removed unused code,
added functions descriptions, removed hardcoding.

Change-Id: I86d530f04b2b856ed98eac737d707dffef005950
Signed-off-by: Ivan <ivan.galkin@samsung.com>
7 years agonetutils/dhcpd: fix incorrect OFFER packet handling
Jin-Seong Kim [Mon, 27 Mar 2017 07:51:18 +0000 (16:51 +0900)]
netutils/dhcpd: fix incorrect OFFER packet handling

This commit fixes incorrect OFFER packet handling of DHCPD. When DHCP
server sends an OFFER packet, the broadcast address in subnet should be
specified instead of the global broadcast address, so that we can avoid
the packet forwarding issue among loopback and user network interfaces.

Change-Id: Ib69ab1b2d17c0f89a56a955c6ac68ee6405267bf
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agonet/lwip: fix DHCP packet handling problem on lwIP
Jin-Seong Kim [Mon, 27 Mar 2017 07:32:14 +0000 (16:32 +0900)]
net/lwip: fix DHCP packet handling problem on lwIP

This commit is to fix dhcp packet handling problem on lwIP stack
 - to pass dhcp packets regardless of destination address,
   IP_ACCEPT_LINK_LAYER_ADDRESSING is needed
 - dhcp packets are addressed using link layer addressing (such as
   Ethernet MAC) so we must not filter on IP

Change-Id: If67298aed453876adf7792bf67de75face0903e6
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agonet/lwip: add comments on DHCP/DHCPS
Jin-Seong Kim [Mon, 27 Mar 2017 07:18:59 +0000 (16:18 +0900)]
net/lwip: add comments on DHCP/DHCPS

This commit is including added comments about DHCP client and server and
disabled LWIP_DHCP definition for explicit directions on lwIP
 - user can configure lwIP feature set via lwipopts.h
 - DHCP client and server are supported by netutils in this platform

Change-Id: I9051246f38a70a741236969454adb315d8aed77a
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agos5j: add netif flags on wlan_init function
Jin-Seong Kim [Mon, 27 Mar 2017 07:00:50 +0000 (16:00 +0900)]
s5j: add netif flags on wlan_init function

This commit is to add netif flags for lwIP stack
 - to handle ARP, Broadcast and IGMP multicast packets,
   those flags should be configured on netif

Change-Id: I1d670291628297e99b7acdb18064fd1552e1564d
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agosidk_s5jt200: set SSSRO partition to mtd ftl type
Junyeon LEE [Mon, 27 Mar 2017 07:58:01 +0000 (16:58 +0900)]
sidk_s5jt200: set SSSRO partition to mtd ftl type

This commit enables CONFIG_MTD_FTL and sets the SSSRO partiton to ftl.

Change-Id: I666c07a342ecc1f009ad098b013400a6a84e6656
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agosidk_s5jt200: initialize a new ftl partition type at boot
Junyeon LEE [Mon, 27 Mar 2017 07:42:39 +0000 (16:42 +0900)]
sidk_s5jt200: initialize a new ftl partition type at boot

This commit adds mtd ftl initialize routine in s5jt200_tash.c. When partition
type specified to a "ftl", the partition is initialized by mtdftl device at boot.

Change-Id: I9e7e262526501d5cb6276525134031e0d52c4ff2
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agofs/mtd: introduce a new mtd type, ftl
Junyeon LEE [Mon, 27 Mar 2017 07:32:22 +0000 (16:32 +0900)]
fs/mtd: introduce a new mtd type, ftl

Backported the mtd ftl layer from NuttX-7.20

Change-Id: I83c00942d9e6ee5c92805b2306c7a31fd073be69
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agonetutils: introduce er-coap library
Jin-Seong Kim [Fri, 24 Mar 2017 02:25:11 +0000 (11:25 +0900)]
netutils: introduce er-coap library

This commit adds er-coap library
 - er-coap library : er-coap-13 from wakaama

Change-Id: I29f034958a8161e7136a0347cb521f8afcf40dfc
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agoarm: configs: add to support ARTIK-053
Heesub Shin [Wed, 15 Mar 2017 01:57:20 +0000 (10:57 +0900)]
arm: configs: add to support ARTIK-053

This commit adds board-specific files for ARTIK-053 Starter Kit which is
an evaluation board based on SAMSUNG S5JT200 WiFi MCU.

Change-Id: Ie2d0b7603d850256adf33bdd9e3af809cad28725
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>