summaryrefslogtreecommitdiff
path: root/cesar/hal/phy/maximus/src
diff options
context:
space:
mode:
authorburet2010-02-11 16:52:40 +0000
committerburet2010-02-11 16:52:40 +0000
commit074d0b4c01b516c14a0e0cc8771bc8146662cbfa (patch)
tree4878342dc143b24c05fadfae655f15cf73d690f6 /cesar/hal/phy/maximus/src
parentc4b07a41420479db6e49dcbbaa95cba9ed39677a (diff)
cesar/hal/phy/maximus: keep comments concerning errors
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@6708 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/hal/phy/maximus/src')
-rw-r--r--cesar/hal/phy/maximus/src/maximus_pbdma.c18
-rw-r--r--cesar/hal/phy/maximus/src/maximus_phy_access.c32
-rw-r--r--cesar/hal/phy/maximus/src/maximus_phy_ctrl.c72
-rw-r--r--cesar/hal/phy/maximus/src/maximus_tmdma.c9
4 files changed, 131 insertions, 0 deletions
diff --git a/cesar/hal/phy/maximus/src/maximus_pbdma.c b/cesar/hal/phy/maximus/src/maximus_pbdma.c
index 93c538d178..0da9e496e3 100644
--- a/cesar/hal/phy/maximus/src/maximus_pbdma.c
+++ b/cesar/hal/phy/maximus/src/maximus_pbdma.c
@@ -17,6 +17,11 @@
#include <errno.h>
+/**
+ * set errno to:
+ * - EINVAL if ctx or first_pb are null,
+ * or if arguments are out-of-range or incoherent
+ */
void
phy_pbdma_start (phy_t *ctx, bool bypass_aes, const u32 nek[4], uint nb_total,
uint nb_ready, uint nb_pb_it, phy_pb_t *first_pb,
@@ -68,6 +73,10 @@ phy_pbdma_start (phy_t *ctx, bool bypass_aes, const u32 nek[4], uint nb_total,
}
+/**
+ * set errno to:
+ * - EINVAL if ctx is null, or if arguments are incoherent
+ */
void
phy_pbdma_update (phy_t *ctx, uint nb_ready, uint nb_pb_it)
{
@@ -93,6 +102,10 @@ phy_pbdma_update (phy_t *ctx, uint nb_ready, uint nb_pb_it)
}
+/**
+ * set errno to:
+ * - EINVAL if ctx is null
+ */
phy_pb_t *
phy_pbdma_get_tail (phy_t *ctx)
{
@@ -115,6 +128,11 @@ phy_pbdma_get_tail (phy_t *ctx)
}
+/**
+ * set errno to:
+ * - EINVAL if ctx or first_chandata are null,
+ * or if first_chandata->type equals 0
+ */
void
phy_pbdma_start_chandata (phy_t *ctx, phy_chandata_t *first_chandata)
{
diff --git a/cesar/hal/phy/maximus/src/maximus_phy_access.c b/cesar/hal/phy/maximus/src/maximus_phy_access.c
index 4114399f0e..d249ac921e 100644
--- a/cesar/hal/phy/maximus/src/maximus_phy_access.c
+++ b/cesar/hal/phy/maximus/src/maximus_phy_access.c
@@ -680,6 +680,11 @@ void maximus_phy_access_slot_count_reset (phy_t *ctx)
}
+/**
+ * set errno to:
+ * - EINVAL if ctx is null
+ * if 'netclock_schedule()' fails, it sets errno
+ */
void
phy_access_backoff_start (phy_t *ctx, u32 date, uint cap)
{
@@ -734,6 +739,10 @@ phy_access_backoff_start (phy_t *ctx, u32 date, uint cap)
}
+/**
+ * set errno to:
+ * - EINVAL if ctx is null
+ */
void
phy_access_backoff_update (phy_t *ctx, uint cap)
{
@@ -779,6 +788,10 @@ phy_access_backoff_update (phy_t *ctx, uint cap)
}
+/**
+ * return 0 if it fails with errno =
+ * - EINVAL if ctx is null
+ */
uint
phy_access_backoff_slot_count (phy_t *ctx)
{
@@ -805,6 +818,10 @@ phy_access_backoff_slot_count (phy_t *ctx)
}
+/**
+ * return 'false' if it fails with errno =
+ * - EINVAL if ctx is null
+ */
bool
phy_access_backoff_prp_won (phy_t *ctx)
{
@@ -831,6 +848,11 @@ phy_access_backoff_prp_won (phy_t *ctx)
}
+/**
+ * set errno to:
+ * - EINVAL if ctx is null
+ * if 'netclock_schedule()' fails, it sets errno
+ */
void
phy_access_timer_program (phy_t *ctx, u32 date)
{
@@ -867,6 +889,11 @@ phy_access_timer_program (phy_t *ctx, u32 date)
}
+/**
+ * set errno to:
+ * - EINVAL if ctx is null
+ * if 'netclock_schedule()' fails, it sets errno
+ */
void
phy_access_timer_update (phy_t *ctx, u32 date)
{
@@ -905,6 +932,11 @@ phy_access_timer_update (phy_t *ctx, u32 date)
}
+/**
+ * set errno to:
+ * - EINVAL if ctx is null
+ * if 'netclock_unschedule()' fails, it sets errno
+ */
void
phy_access_timer_cancel (phy_t *ctx)
{
diff --git a/cesar/hal/phy/maximus/src/maximus_phy_ctrl.c b/cesar/hal/phy/maximus/src/maximus_phy_ctrl.c
index 78a21a117c..f40ac91d7f 100644
--- a/cesar/hal/phy/maximus/src/maximus_phy_ctrl.c
+++ b/cesar/hal/phy/maximus/src/maximus_phy_ctrl.c
@@ -1874,6 +1874,10 @@ tick_t maximus_phy_schedule_tick (u32 date)
}
+/**
+ * set errno to:
+ * - EINVAL if arguments are null
+ */
phy_t *
phy_init (void *user_data, phy_rx_fc_cb_t rx_fc_cb, phy_access_cb_t access_cb,
phy_access_conf_cb_t access_conf_cb, phy_pbdma_cb_t pbdma_cb,
@@ -1999,6 +2003,10 @@ phy_init (void *user_data, phy_rx_fc_cb_t rx_fc_cb, phy_access_cb_t access_cb,
}
+/**
+ * set errno to:
+ * - EINVAL if ctx is null
+ */
void
phy_reset (phy_t *ctx)
{
@@ -2113,6 +2121,10 @@ phy_reset (phy_t *ctx)
}
+/**
+ * set errno to:
+ * - EINVAL if ctx is null
+ */
void
phy_uninit (phy_t *ctx)
{
@@ -2163,6 +2175,10 @@ phy_uninit (phy_t *ctx)
}
+/**
+ * set errno to:
+ * - EINVAL if ctx is null
+ */
u32
phy_date (phy_t *ctx)
{
@@ -2191,6 +2207,10 @@ phy_seed (void)
}
+/**
+ * set errno to:
+ * - EINVAL if ctx is null
+ */
u32
phy_sysdate (phy_t *ctx)
{
@@ -2213,6 +2233,10 @@ phy_sysdate (phy_t *ctx)
}
+/**
+ * set errno to:
+ * - EINVAL if ctx is null
+ */
void
phy_clock_set_numerator (phy_t *ctx, uint numerator)
{
@@ -2231,6 +2255,10 @@ phy_clock_set_numerator (phy_t *ctx, uint numerator)
}
+/**
+ * set errno to:
+ * - EINVAL if ctx is null
+ */
u32
phy_clock_get_zero_cross_captured_date (phy_t *ctx)
{
@@ -2252,6 +2280,10 @@ phy_clock_get_zero_cross_captured_date (phy_t *ctx)
}
+/**
+ * set errno to:
+ * - EINVAL if ctx is null
+ */
u32
phy_clock_get_zero_cross_captured_sysdate (phy_t *ctx)
{
@@ -2274,6 +2306,10 @@ phy_clock_get_zero_cross_captured_sysdate (phy_t *ctx)
}
+/**
+ * set errno to:
+ * - EINVAL if ctx is null
+ */
void
phy_tx_fc10 (phy_t *ctx, u32 date, u32 fc_10)
{
@@ -2486,6 +2522,11 @@ phy_tx_param_sound (phy_t *ctx, phy_fc_mode_t fc_mode, uint nb_pb,
}
+/**
+ * set errno to:
+ * - EINVAL if ctx is null
+ * if 'netclock_schedule()' fails, it sets errno
+ */
void
phy_tx_frame (phy_t *ctx, u32 date, bool want_conf, bool stop_tx_on_prp_lost,
const u32 fc_av[4])
@@ -2561,6 +2602,10 @@ phy_tx_cancel (phy_t *ctx)
}
+/**
+ * set errno to:
+ * - EINVAL if ctx is null, or if fc_mode is out-of-range
+ */
void
phy_rx_param (phy_t *ctx, phy_fc_mode_t fc_mode)
{
@@ -2583,6 +2628,11 @@ phy_rx_param (phy_t *ctx, phy_fc_mode_t fc_mode)
}
+/**
+ * set errno to:
+ * - EINVAL if ctx is null
+ * if 'netclock_schedule()' fails, it sets errno
+ */
void
phy_rx_activate (phy_t *ctx, bool now, u32 date, bool pre_detection)
{
@@ -2905,6 +2955,10 @@ phy_rx_prepare_sound (phy_t *ctx, uint nb_pb, u32 mod_fecrate_pb_size,
}
+/**
+ * return 0 if it fails with errno =
+ * - EINVAL if ctx is null
+ */
u32
phy_rx_fc10 (phy_t *ctx)
{
@@ -2947,6 +3001,10 @@ phy_rx_sysdate (phy_t *ctx)
}
+/**
+ * set errno to:
+ * - EINVAL if ctx or extra_timer_cb are null
+ */
void
phy_extra_timer_init (phy_t *ctx, void *extra_timer_user_data,
phy_extra_timer_cb_t extra_timer_cb)
@@ -2968,6 +3026,11 @@ phy_extra_timer_init (phy_t *ctx, void *extra_timer_user_data,
}
+/**
+ * set errno to:
+ * - EINVAL if ctx is null
+ * if 'netclock_schedule()' fails, it sets errno
+ */
void
phy_extra_timer_program (phy_t *ctx, u32 date)
{
@@ -3002,6 +3065,11 @@ phy_extra_timer_program (phy_t *ctx, u32 date)
}
+/**
+ * set errno to:
+ * - EINVAL if ctx is null
+ * if 'netclock_unschedule()' fails, it sets errno
+ */
void
phy_extra_timer_cancel (phy_t *ctx)
{
@@ -3037,6 +3105,10 @@ phy_extra_timer_cancel (phy_t *ctx)
}
+/**
+ * set errno to:
+ * - EINVAL if ctx or zero_cross_cb are null
+ */
void
phy_zero_cross_init (phy_t *ctx, phy_zero_cross_cb_t zero_cross_cb)
{
diff --git a/cesar/hal/phy/maximus/src/maximus_tmdma.c b/cesar/hal/phy/maximus/src/maximus_tmdma.c
index 590dfab10e..237f3940b0 100644
--- a/cesar/hal/phy/maximus/src/maximus_tmdma.c
+++ b/cesar/hal/phy/maximus/src/maximus_tmdma.c
@@ -17,6 +17,10 @@
#include "mac/common/defs.h" // for 'MAC_PB520_BYTES'
#include <errno.h>
+/**
+ * set errno to:
+ * - EINVAL if ctx or tonemask are null
+ */
void
phy_set_tonemask (phy_t *ctx, u32 *tonemask, uint carrier_nb)
{
@@ -53,6 +57,11 @@ phy_set_tonemask (phy_t *ctx, u32 *tonemask, uint carrier_nb)
}
+/**
+ * set errno to:
+ * - EINVAL if ctx or tonemap are null,
+ * or if arguments are out-of-range or incorrect
+ */
void
phy_set_tonemap (phy_t *ctx, blk_t *tonemap)
{